4f21f6a2e1
* impl and unit tests for replaceAsset * Remove it.only * Typo in generated spec +regen * Remove unused dtos * Dto removal fallout/bugfix * fix - missed a line * sql:generate * Review comments * Unused imports * chore: clean up --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
20 lines
488 B
TypeScript
20 lines
488 B
TypeScript
import { AppRoute } from '$lib/constants';
|
|
import { defaults, getServerConfig } from '@immich/sdk';
|
|
import { redirect } from '@sveltejs/kit';
|
|
import type { PageLoad } from './$types';
|
|
|
|
export const load = (async ({ fetch }) => {
|
|
defaults.fetch = fetch;
|
|
const { isInitialized } = await getServerConfig();
|
|
if (!isInitialized) {
|
|
// Admin not registered
|
|
redirect(302, AppRoute.AUTH_REGISTER);
|
|
}
|
|
|
|
return {
|
|
meta: {
|
|
title: 'Login',
|
|
},
|
|
};
|
|
}) satisfies PageLoad;
|