MCPcopy Index your code
hub / github.com/CodebuffAI/codebuff / getUserInfoFromApiKey

Function getUserInfoFromApiKey

web/src/app/api/v1/ads/__tests__/ads.test.ts:37–46  ·  view source on GitHub ↗
({
    apiKey,
  })

Source from the content-addressed store, hash-verified

35 let trackEvent: TrackEventFn
36
37 const getUserInfoFromApiKey: GetUserInfoFromApiKeyFn = async ({
38 apiKey,
39 }) => {
40 if (apiKey !== 'test-key') return null
41 return {
42 id: 'user-123',
43 email: 'test@example.com',
44 discord_id: null,
45 } as Awaited<ReturnType<GetUserInfoFromApiKeyFn>>
46 }
47
48 beforeEach(() => {
49 insertedRows.length = 0

Callers 6

requireUserFromApiKeyFunction · 0.50
postChatCompletionsFunction · 0.50
getMeFunction · 0.50
postUsageFunction · 0.50
postAgentRunsFunction · 0.50
postAgentRunsStepsFunction · 0.50

Calls

no outgoing calls

Tested by

no test coverage detected