MCPcopy Create free account
hub / github.com/freecodexyz/free-code / getCustomApiKeyStatus

Function getCustomApiKeyStatus

src/utils/config.ts:1123–1134  ·  view source on GitHub ↗
(
  truncatedApiKey: string,
)

Source from the content-addressed store, hash-verified

1121}
1122
1123export function getCustomApiKeyStatus(
1124 truncatedApiKey: string,
1125): 'approved' | 'rejected' | 'new' {
1126 const config = getGlobalConfig()
1127 if (config.customApiKeyResponses?.approved?.includes(truncatedApiKey)) {
1128 return 'approved'
1129 }
1130 if (config.customApiKeyResponses?.rejected?.includes(truncatedApiKey)) {
1131 return 'rejected'
1132 }
1133 return 'new'
1134}
1135
1136function saveConfig<A extends object>(
1137 file: string,

Callers 2

showSetupScreensFunction · 0.85
OnboardingFunction · 0.85

Calls 1

getGlobalConfigFunction · 0.85

Tested by

no test coverage detected