MCPcopy Create free account
hub / github.com/prisma/prisma-examples / GET

Function GET

orm/solid-start/src/routes/api/users.ts:3–12  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1import prisma from '../../../lib/prisma'
2
3export async function GET() {
4 const users = await prisma.user.findMany({
5 include: {
6 posts: true,
7 },
8 })
9 return new Response(JSON.stringify(users), {
10 headers: { 'Content-Type': 'application/json' },
11 })
12}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected