Skip to content

Commit

Permalink
send id
Browse files Browse the repository at this point in the history
  • Loading branch information
willuhmjs committed Nov 25, 2024
1 parent c524180 commit f884f0b
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
3 changes: 2 additions & 1 deletion src/routes/[id]/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ export const load = async ({ params }) => {
select: {
word: true,
difficulty: true,
hintDb: true
hintDb: true,
id: true
}
});
if (!game) {
Expand Down
4 changes: 2 additions & 2 deletions src/routes/menu/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ export const load = async () => {
word: true,
day: true,
difficulty: true,
hintDb: true
},
hintDb: true,
},
orderBy: {
day: 'desc'
}
Expand Down
3 changes: 2 additions & 1 deletion src/routes/random/+page.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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()),
Expand Down

0 comments on commit f884f0b

Please sign in to comment.