Fix unused variables and clean up codebase
All checks were successful
Lint and Build / build (pull_request) Successful in 2m47s
All checks were successful
Lint and Build / build (pull_request) Successful in 2m47s
- Remove unused NextResponse imports from API routes - Remove unused result variable in teams DELETE route - Remove unused Link import from page.tsx - Remove unused inspectTextSourceProperties function from obsClient.js - Fix unused catch variables and response variables in test files - Clean up all ESLint warnings for unused variables
This commit is contained in:
parent
d75f599711
commit
b1215ea82c
10 changed files with 9 additions and 43 deletions
|
@ -32,7 +32,7 @@ describe('apiHelpers', () => {
|
|||
|
||||
describe('createErrorResponse', () => {
|
||||
it('creates error response with default status 500', () => {
|
||||
const _response = createErrorResponse('Test Error');
|
||||
createErrorResponse('Test Error');
|
||||
|
||||
expect(NextResponse.json).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
|
@ -44,7 +44,7 @@ describe('apiHelpers', () => {
|
|||
});
|
||||
|
||||
it('creates error response with custom status and message', () => {
|
||||
const _response = createErrorResponse('Test Error', 400, 'Custom message', { detail: 'extra' });
|
||||
createErrorResponse('Test Error', 400, 'Custom message', { detail: 'extra' });
|
||||
|
||||
expect(NextResponse.json).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
|
@ -81,7 +81,7 @@ describe('apiHelpers', () => {
|
|||
describe('createSuccessResponse', () => {
|
||||
it('creates success response with default status 200', () => {
|
||||
const data = { test: 'data' };
|
||||
const _response = createSuccessResponse(data);
|
||||
createSuccessResponse(data);
|
||||
|
||||
expect(NextResponse.json).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
|
@ -95,7 +95,7 @@ describe('apiHelpers', () => {
|
|||
|
||||
it('creates success response with custom status', () => {
|
||||
const data = { id: 1, name: 'test' };
|
||||
const _response = createSuccessResponse(data, 201);
|
||||
createSuccessResponse(data, 201);
|
||||
|
||||
expect(NextResponse.json).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
|
|
|
@ -244,20 +244,6 @@ async function getAvailableTextInputKind() {
|
|||
}
|
||||
}
|
||||
|
||||
async function inspectTextSourceProperties(inputKind) {
|
||||
try {
|
||||
const obsClient = await getOBSClient();
|
||||
|
||||
// Get the default properties for this input kind
|
||||
const { inputProperties } = await obsClient.call('GetInputDefaultSettings', { inputKind });
|
||||
console.log(`Default properties for ${inputKind}:`, JSON.stringify(inputProperties, null, 2));
|
||||
|
||||
return inputProperties;
|
||||
} catch (error) {
|
||||
console.error('Error inspecting text source properties:', error.message);
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
async function createTextSource(sceneName, textSourceName, text) {
|
||||
try {
|
||||
|
@ -394,7 +380,7 @@ async function createStreamGroup(groupName, streamName, teamName, url) {
|
|||
try {
|
||||
await obsClient.call('CreateScene', { sceneName: streamGroupName });
|
||||
console.log(`Created nested scene "${streamGroupName}" for stream grouping`);
|
||||
} catch (sceneError) {
|
||||
} catch (error) {
|
||||
console.log(`Nested scene "${streamGroupName}" might already exist`);
|
||||
}
|
||||
|
||||
|
@ -457,7 +443,7 @@ async function createStreamGroup(groupName, streamName, teamName, url) {
|
|||
sourceName: colorSourceName
|
||||
});
|
||||
console.log(`Added color source background "${colorSourceName}" to nested scene`);
|
||||
} catch (e) {
|
||||
} catch (error) {
|
||||
console.log('Color source background might already be in nested scene');
|
||||
}
|
||||
|
||||
|
@ -467,7 +453,7 @@ async function createStreamGroup(groupName, streamName, teamName, url) {
|
|||
sourceName: textSourceName
|
||||
});
|
||||
console.log(`Added text source "${textSourceName}" to nested scene`);
|
||||
} catch (e) {
|
||||
} catch (error) {
|
||||
console.log('Text source might already be in nested scene');
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue