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

Function getCustomApiKeyStatus

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

Source from the content-addressed store, hash-verified

1175}
1176
1177export function getCustomApiKeyStatus(
1178 truncatedApiKey: string,
1179): 'approved' | 'rejected' | 'new' {
1180 const config = getGlobalConfig()
1181 if (config.customApiKeyResponses?.approved?.includes(truncatedApiKey)) {
1182 return 'approved'
1183 }
1184 if (config.customApiKeyResponses?.rejected?.includes(truncatedApiKey)) {
1185 return 'rejected'
1186 }
1187 return 'new'
1188}
1189
1190function saveConfig<A extends object>(
1191 file: string,

Callers 2

showSetupScreensFunction · 0.85
OnboardingFunction · 0.85

Calls 1

getGlobalConfigFunction · 0.70

Tested by

no test coverage detected