Skip to content

Commit 435b3c4

Browse files
committed
fix(frontend/api): cast PublicInfo via unknown for absent-field assertions
PublicInfo no longer includes api_key_secret_url or deployment_aws_account_id (moved to DeploymentInfo by #633). The direct cast to Record<string,unknown> therefore fails TS2352. Cast through unknown first to satisfy the type checker while preserving the runtime assertion that these fields are absent.
1 parent 063489a commit 435b3c4

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

‎frontend/src/__tests__/api.test.ts‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -974,8 +974,8 @@ describe('Public Info API', () => {
974974
expect(info.version).toBe('1.0.0');
975975
expect(info.admin_exists).toBe(true);
976976
// Sensitive fields must not be present on the public endpoint response.
977-
expect((info as Record<string, unknown>)['api_key_secret_url']).toBeUndefined();
978-
expect((info as Record<string, unknown>)['deployment_aws_account_id']).toBeUndefined();
977+
expect((info as unknown as Record<string, unknown>)['api_key_secret_url']).toBeUndefined();
978+
expect((info as unknown as Record<string, unknown>)['deployment_aws_account_id']).toBeUndefined();
979979
expect(fetchMock).toHaveBeenCalledWith('/api/info');
980980
});
981981

0 commit comments

Comments
 (0)