MCPcopy Index your code
hub / github.com/Linen-dev/linen.dev / getAccountByApiKey

Method getAccountByApiKey

apps/web/services/api-keys.ts:20–26  ·  view source on GitHub ↗
({ apiKey }: { apiKey: string })

Source from the content-addressed store, hash-verified

18 }
19
20 static async getAccountByApiKey({ apiKey }: { apiKey: string }) {
21 const hash = this.decryptKey({ token: apiKey });
22 return await prisma.apiKeys.findFirst({
23 include: { account: true },
24 where: { hash },
25 });
26 }
27
28 static async list({ accountId }: { accountId: string }) {
29 return await prisma.apiKeys.findMany({

Callers 2

api-keys.test.tsFile · 0.80
integrationMiddlewareFunction · 0.80

Calls 1

decryptKeyMethod · 0.95

Tested by

no test coverage detected