Compare commits

..

No commits in common. "43c0311d5bb641333eddcaf70deac82d1f91199b" and "19906235d0339ca0ec47c9596b16fd1107003575" have entirely different histories.

View file

@ -30,12 +30,7 @@ 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
) {
if (!chapter.puzzles.some((puzzle) => puzzle.id === parseInt(puzzleId))) {
throw redirect(303, `/dashboard/chapters/${chapterId}`);
}
@ -51,8 +46,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');
}