mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
refactor: redirect code (#25054)
This commit is contained in:
@@ -9,7 +9,7 @@ import type { PageLoad } from './$types';
|
||||
export const load = (async ({ url }) => {
|
||||
await authenticate(url);
|
||||
if (!get(user).shouldChangePassword) {
|
||||
redirect(302, AppRoute.PHOTOS);
|
||||
redirect(307, AppRoute.PHOTOS);
|
||||
}
|
||||
|
||||
const $t = await getFormatter();
|
||||
|
||||
@@ -9,7 +9,7 @@ export const load = (async ({ parent, url }) => {
|
||||
|
||||
if (!serverConfigManager.value.isInitialized) {
|
||||
// Admin not registered
|
||||
redirect(302, AppRoute.AUTH_REGISTER);
|
||||
redirect(307, AppRoute.AUTH_REGISTER);
|
||||
}
|
||||
|
||||
const $t = await getFormatter();
|
||||
|
||||
@@ -8,7 +8,7 @@ export const load = (async ({ parent }) => {
|
||||
await parent();
|
||||
if (serverConfigManager.value.isInitialized) {
|
||||
// Admin has been registered, redirect to login
|
||||
redirect(302, AppRoute.AUTH_LOGIN);
|
||||
redirect(307, AppRoute.AUTH_LOGIN);
|
||||
}
|
||||
|
||||
const $t = await getFormatter();
|
||||
|
||||
Reference in New Issue
Block a user