Update server setup logic and add admin user creation in setup page
This commit is contained in:
@@ -1,12 +1,15 @@
|
||||
import { goto } from "$app/navigation";
|
||||
import type { LayoutServerLoad, PageServerLoad } from "./$types";
|
||||
|
||||
export const load: LayoutServerLoad = async (event) => {
|
||||
if (event.locals.user) {
|
||||
return {
|
||||
user: event.locals.user,
|
||||
isServerSetup: event.locals.isServerSetup,
|
||||
};
|
||||
}
|
||||
return {
|
||||
user: null,
|
||||
isServerSetup: event.locals.isServerSetup,
|
||||
};
|
||||
};
|
||||
Reference in New Issue
Block a user