From fc3c885274ffbb9f5633633db9f4110aa9046d6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Th=C3=A9o?= <43091603+glazk0@users.noreply.github.com> Date: Sun, 1 Oct 2023 00:44:40 +0200 Subject: [PATCH] feat: removed useless stuff --- .../chapters/[chapterId]/puzzle/[puzzleId]/+page.server.ts | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/routes/dashboard/chapters/[chapterId]/puzzle/[puzzleId]/+page.server.ts b/src/routes/dashboard/chapters/[chapterId]/puzzle/[puzzleId]/+page.server.ts index fbb21f2..d4531b6 100644 --- a/src/routes/dashboard/chapters/[chapterId]/puzzle/[puzzleId]/+page.server.ts +++ b/src/routes/dashboard/chapters/[chapterId]/puzzle/[puzzleId]/+page.server.ts @@ -30,8 +30,6 @@ export const load = (async ({ parent, fetch, cookies, params: { chapterId, puzzl throw redirect(303, `/dashboard/chapters`); } - console.log(chapter); - if ( !chapter.puzzles.some((puzzle) => puzzle.id === parseInt(puzzleId)) || !chapter.puzzles.find((puzzle) => puzzle.id === parseInt(puzzleId))?.show @@ -51,8 +49,6 @@ export const load = (async ({ parent, fetch, cookies, params: { chapterId, puzzl const puzzle = await res.json(); - console.log(puzzle); - if (!puzzle) { throw error(404, 'Puzzle not found'); } @@ -65,7 +61,7 @@ export const load = (async ({ parent, fetch, cookies, params: { chapterId, puzzl }) satisfies PageServerLoad; export const actions = { - default: async ({ params, request, cookies }) => { + default: async ({ params }) => { throw redirect(303, `/dashboard/chapters/${params.chapterId}/puzzle/${params.puzzleId}`); } } satisfies Actions;