Skip to content

Commit 18c3a07

Browse files
committed
fix: code review feedback
1 parent 83805be commit 18c3a07

3 files changed

Lines changed: 13 additions & 13 deletions

File tree

api/dev/keys/fc91da7b-0284-46f4-9018-55aa9759fba9.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"createdAt": "2025-07-23T17:34:06.301Z",
33
"description": "Internal admin API key used by CLI commands for system operations",
44
"id": "fc91da7b-0284-46f4-9018-55aa9759fba9",
5-
"key": "2e6a53d5bcc0c355ed52b65fafaba78c437ada090e3462e4bd12eb96d8245353",
5+
"key": "_______SUPER_SECRET_KEY_______",
66
"name": "CliInternal",
77
"permissions": [],
88
"roles": [

api/src/unraid-api/app/__test__/module-dependencies.integration.spec.ts

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,4 @@ describe('Module Dependencies Integration', () => {
1919
}
2020
}
2121
});
22-
23-
it('should detect dependency injection issues at compile time', async () => {
24-
// This test validates that RestModule can be compiled without errors
25-
await expect(
26-
Test.createTestingModule({
27-
imports: [RestModule],
28-
}).compile()
29-
).resolves.toBeDefined();
30-
});
3122
});

api/src/unraid-api/cli/sso/validate-token.command.ts

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -83,9 +83,18 @@ export class ValidateTokenCommand extends CommandRunner {
8383
}
8484
const client = await this.internalClient.getClient();
8585

86-
const result = await client.query({
87-
query: SSO_USERS_QUERY,
88-
});
86+
let result;
87+
try {
88+
result = await client.query({
89+
query: SSO_USERS_QUERY,
90+
});
91+
} catch (error) {
92+
this.createErrorAndExit('Failed to query SSO users');
93+
}
94+
95+
if (result.errors && result.errors.length > 0) {
96+
this.createErrorAndExit('Failed to retrieve SSO configuration');
97+
}
8998

9099
const ssoUsers = result.data?.settings?.api?.ssoSubIds || [];
91100

0 commit comments

Comments
 (0)