Spaces:
Running
on
CPU Upgrade
Running
on
CPU Upgrade
File size: 444 Bytes
ad36e9e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 |
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,
})
} |