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

Function lookupUserById

scripts/grant-credits.ts:23–30  ·  view source on GitHub ↗
(userId: string)

Source from the content-addressed store, hash-verified

21}
22
23async function lookupUserById(userId: string) {
24 const [user] = await db
25 .select({ id: schema.user.id, email: schema.user.email, name: schema.user.name })
26 .from(schema.user)
27 .where(eq(schema.user.id, userId))
28 .limit(1)
29 return user ?? null
30}
31
32async function main() {
33 const rl = createInterface({ input: process.stdin, output: process.stdout })

Callers 1

mainFunction · 0.85

Calls 1

fromMethod · 0.80

Tested by

no test coverage detected