({ apiKey }: { apiKey: string })
| 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({ |
no test coverage detected