mirror of
https://github.com/samsonjs/immich.git
synced 2026-04-27 15:07:45 +00:00
13 lines
349 B
TypeScript
13 lines
349 B
TypeScript
import { redirect } from '@sveltejs/kit';
|
|
import type { PageServerLoad } from './$types';
|
|
import { serverApi } from '@api';
|
|
|
|
export const load: PageServerLoad = async () => {
|
|
const { data } = await serverApi.userApi.getUserCount(true);
|
|
if (data.userCount === 0) {
|
|
// Admin not registered
|
|
throw redirect(302, '/auth/register');
|
|
}
|
|
|
|
return;
|
|
};
|