404 fix attempt 2

This commit is contained in:
2026-05-17 17:02:07 -04:00
parent 4ca9536b05
commit 4efd1ffb6d
3 changed files with 10 additions and 7 deletions

View File

@@ -1,6 +1,10 @@
import type { LayoutServerLoad } from './$types';
import { getDb } from '$lib/server/db';
import { scanLibraries } from '$lib/server/scanner';
import { getSession } from '$lib/server/auth';
export const load: LayoutServerLoad = ({ cookies }) => {
const db = getDb();
scanLibraries(db);
return { loggedIn: getSession(cookies) };
};

View File

@@ -1,11 +1,9 @@
import type { PageServerLoad } from './$types';
import { getDb } from '$lib/server/db';
import { scanLibraries } from '$lib/server/scanner';
export const load: PageServerLoad = async ({ parent }) => {
const { loggedIn } = await parent();
const db = getDb();
scanLibraries(db);
const games = loggedIn
? db