Compare commits
No commits in common. "43c0311d5bb641333eddcaf70deac82d1f91199b" and "19906235d0339ca0ec47c9596b16fd1107003575" have entirely different histories.
43c0311d5b
...
19906235d0
1 changed files with 1 additions and 8 deletions
|
@ -30,12 +30,7 @@ export const load = (async ({ parent, fetch, cookies, params: { chapterId, puzzl
|
||||||
throw redirect(303, `/dashboard/chapters`);
|
throw redirect(303, `/dashboard/chapters`);
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(chapter);
|
if (!chapter.puzzles.some((puzzle) => puzzle.id === parseInt(puzzleId))) {
|
||||||
|
|
||||||
if (
|
|
||||||
!chapter.puzzles.some((puzzle) => puzzle.id === parseInt(puzzleId)) ||
|
|
||||||
!chapter.puzzles.find((puzzle) => puzzle.id === parseInt(puzzleId))?.show
|
|
||||||
) {
|
|
||||||
throw redirect(303, `/dashboard/chapters/${chapterId}`);
|
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();
|
const puzzle = await res.json();
|
||||||
|
|
||||||
console.log(puzzle);
|
|
||||||
|
|
||||||
if (!puzzle) {
|
if (!puzzle) {
|
||||||
throw error(404, 'Puzzle not found');
|
throw error(404, 'Puzzle not found');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue