Skip to content

Commit

Permalink
fix(bug): create db on init before checking for wizard
Browse files Browse the repository at this point in the history
  • Loading branch information
rishikanthc committed Oct 19, 2024
1 parent dc5f0d1 commit b6ce092
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/hooks.server.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { env } from '$env/dynamic/private';
import type { Handle } from '@sveltejs/kit';
import { sequence } from '@sveltejs/kit/hooks';
import { redirect } from '@sveltejs/kit';
import { ensureCollectionExists } from '$lib/fileFuncs';
import '$lib/queue';
import { resolve } from 'chart.js/helpers';

Expand Down Expand Up @@ -54,6 +55,7 @@ export const authentication: Handle = async ({ event, resolve }) => {
};

export const configuration: Handle = async ({event, resolve}) => {
ensureCollectionExists(event.locals.pb);
const settings = await event.locals.pb.collection('settings').getList(1,1);

console.log(settings)
Expand Down

0 comments on commit b6ce092

Please sign in to comment.