From f884f0b0a83a3db2023bda876c6268ae96cadb8b Mon Sep 17 00:00:00 2001 From: William Faircloth Date: Sun, 24 Nov 2024 21:57:56 -0500 Subject: [PATCH] send id --- src/routes/[id]/+page.server.ts | 3 ++- src/routes/menu/+page.server.ts | 4 ++-- src/routes/random/+page.server.ts | 3 ++- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/routes/[id]/+page.server.ts b/src/routes/[id]/+page.server.ts index a4c71b4..6f1ff00 100644 --- a/src/routes/[id]/+page.server.ts +++ b/src/routes/[id]/+page.server.ts @@ -16,7 +16,8 @@ export const load = async ({ params }) => { select: { word: true, difficulty: true, - hintDb: true + hintDb: true, + id: true } }); if (!game) { diff --git a/src/routes/menu/+page.server.ts b/src/routes/menu/+page.server.ts index 318b2bf..4b0ee7b 100644 --- a/src/routes/menu/+page.server.ts +++ b/src/routes/menu/+page.server.ts @@ -30,8 +30,8 @@ export const load = async () => { word: true, day: true, difficulty: true, - hintDb: true - }, + hintDb: true, +}, orderBy: { day: 'desc' } diff --git a/src/routes/random/+page.server.ts b/src/routes/random/+page.server.ts index 242b95c..34c59e3 100644 --- a/src/routes/random/+page.server.ts +++ b/src/routes/random/+page.server.ts @@ -8,7 +8,8 @@ export const load = async () => { select: { word: true, difficulty: true, - hintDb: true + hintDb: true, + id: true }, take: 1, skip: Math.floor(Math.random() * await prisma.game.count()),