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

Function getConsumedTokenStatus

web/src/app/onboard/_db.ts:49–59  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

47 getConsumedCliAuthCodeTokenIdentifier(authCodeToken)
48 const getConsumedTokenStatus =
49 async (): Promise<CliAuthCodeTokenConsumeResult> => {
50 const existingConsumed = await db
51 .select({ id: schema.verificationToken.identifier })
52 .from(schema.verificationToken)
53 .where(eq(schema.verificationToken.identifier, consumedIdentifier))
54 .limit(1)
55
56 return existingConsumed[0]
57 ? { status: 'already_consumed' }
58 : { status: 'missing' }
59 }
60
61 const active = await db
62 .select({ authCode: schema.verificationToken.token })

Callers 1

consumeCliAuthCodeTokenFunction · 0.70

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected