Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
import { json } from '@sveltejs/kit'; | |
import prisma from '$lib/prisma'; | |
/** @type {import('./$types').RequestHandler} */ | |
export async function GET() { | |
const cards = await prisma.model.findMany({ | |
where: { | |
isPublic: true, | |
}, | |
select: { | |
id: true, | |
likes: true, | |
downloads: true, | |
likes7d: true, | |
image: true, | |
isPublic: true, | |
createdAt: true, | |
}, | |
}) | |
return json({ | |
cards, | |
}) | |
} |