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

Method create

apps/web/services/api-keys.ts:35–49  ·  view source on GitHub ↗
({
    accountId,
    name,
    scope,
  }: {
    accountId: string;
    name: string;
    scope?: string[];
  })

Source from the content-addressed store, hash-verified

33 }
34
35 static async create({
36 accountId,
37 name,
38 scope,
39 }: {
40 accountId: string;
41 name: string;
42 scope?: string[];
43 }) {
44 const { token, hash } = this.createKey();
45 await prisma.apiKeys.create({
46 data: { name, accountId, scope, hash },
47 });
48 return { token };
49 }
50
51 static async revoke({ id, accountId }: { id: string; accountId: string }) {
52 const apiKey = await prisma.apiKeys.findUnique({ where: { id } });

Callers 15

createUserFunction · 0.45
createThreadFunction · 0.45
createAuthFunction · 0.45
createMessageFunction · 0.45
createAccountFunction · 0.45
createChannelFunction · 0.45
runFunction · 0.45
createThreadFunction · 0.45
predictMethod · 0.45
buildAxiosFunction · 0.45
constructorMethod · 0.45
index.tsFile · 0.45

Calls 1

createKeyMethod · 0.95

Tested by

no test coverage detected