refactor: redirect code (#25054)

This commit is contained in:
Jason Rasmussen
2026-01-05 14:39:28 -05:00
committed by GitHub
parent 10989e6927
commit 4d32968f2b
13 changed files with 23 additions and 23 deletions
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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();
+1 -1
View File
@@ -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();