misc: removed useless stuff
This commit is contained in:
parent
0c17a572da
commit
0b298e4980
2 changed files with 5 additions and 6 deletions
|
@ -1,8 +1,8 @@
|
||||||
import { API_URL } from '$env/static/private';
|
import { redirect } from '@sveltejs/kit';
|
||||||
import { redirect, type Actions } from '@sveltejs/kit';
|
|
||||||
import type { PageServerLoad } from './$types';
|
import type { PageServerLoad } from './$types';
|
||||||
|
|
||||||
export const load = (async ({ parent, fetch, cookies, params: { chapterId } }) => {
|
export const load = (async ({ parent, params: { chapterId } }) => {
|
||||||
await parent();
|
await parent();
|
||||||
throw redirect(303, chapterId ? `/dashboard/chapters/${chapterId}` : `/dashboard/chapters`);
|
throw redirect(303, chapterId ? `/dashboard/chapters/${chapterId}` : `/dashboard/chapters`);
|
||||||
}) satisfies PageServerLoad;
|
}) satisfies PageServerLoad;
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
import { API_URL } from '$env/static/private';
|
import { API_URL } from '$env/static/private';
|
||||||
import { error, redirect, type Actions } from '@sveltejs/kit';
|
import { error, redirect, type Actions } from '@sveltejs/kit';
|
||||||
import type Puzzle from '$lib/components/Puzzle.svelte';
|
|
||||||
import type { PageServerLoad } from './$types';
|
import type { PageServerLoad } from './$types';
|
||||||
|
|
||||||
|
import type Puzzle from '$lib/components/Puzzle.svelte';
|
||||||
import type { Chapter } from '$lib/types';
|
import type { Chapter } from '$lib/types';
|
||||||
|
|
||||||
export const load = (async ({ parent, fetch, cookies, params: { chapterId, puzzleId } }) => {
|
export const load = (async ({ parent, fetch, cookies, params: { chapterId, puzzleId } }) => {
|
||||||
|
@ -49,8 +50,6 @@ export const load = (async ({ parent, fetch, cookies, params: { chapterId, puzzl
|
||||||
throw error(404, 'Puzzle not found');
|
throw error(404, 'Puzzle not found');
|
||||||
}
|
}
|
||||||
|
|
||||||
console.log(puzzle.content);
|
|
||||||
|
|
||||||
return {
|
return {
|
||||||
puzzle: puzzle as Puzzle
|
puzzle: puzzle as Puzzle
|
||||||
};
|
};
|
||||||
|
|
Loading…
Add table
Reference in a new issue