()
| 3 | |
| 4 | export default { |
| 5 | fetch() { |
| 6 | const adapter = new PrismaD1({ |
| 7 | CLOUDFLARE_DATABASE_ID: '', |
| 8 | CLOUDFLARE_D1_TOKEN: '', |
| 9 | CLOUDFLARE_ACCOUNT_ID: '', |
| 10 | }) |
| 11 | // When using Prisma Client in an edge runtime it would error like this: |
| 12 | // ... is unable to run in an edge runtime. As an alternative, try Accelerate: https://pris.ly/d/accelerate. |
| 13 | // But that should only happen when executing a query |
| 14 | // This tests that creating an instance of PrismaClient does not error |
| 15 | // eslint-disable-next-line @typescript-eslint/no-unused-vars |
| 16 | const db = new PrismaClient({ adapter }) |
| 17 | |
| 18 | const data = { |
| 19 | Role, |
| 20 | ModelName: Prisma.ModelName, |
| 21 | } |
| 22 | |
| 23 | return new Response(JSON.stringify(data)) |
| 24 | }, |
| 25 | } |
no outgoing calls
no test coverage detected