feat(ui): more ui improvements

This commit is contained in:
DecDuck
2024-11-24 16:12:19 +11:00
parent 305de9f45a
commit e408ac5df8
12 changed files with 201 additions and 85 deletions
+15
View File
@@ -0,0 +1,15 @@
import prisma from "~/server/internal/db/database";
export default defineEventHandler(async (h3) => {
const userId = await h3.context.session.getUserId(h3);
if (!userId) throw createError({ statusCode: 403 });
const games = await prisma.game.findMany({
orderBy: {
mReleased: "desc",
},
take: 12,
});
return games;
});