mirror of
https://github.com/immich-app/immich.git
synced 2026-03-01 01:59:06 +03:00
refactor: redirect code (#25054)
This commit is contained in:
@@ -59,11 +59,11 @@ export const authenticate = async (url: URL, options?: AuthOptions) => {
|
||||
}
|
||||
|
||||
if (!user) {
|
||||
redirect(302, `${AppRoute.AUTH_LOGIN}?continue=${encodeURIComponent(url.pathname + url.search)}`);
|
||||
redirect(307, `${AppRoute.AUTH_LOGIN}?continue=${encodeURIComponent(url.pathname + url.search)}`);
|
||||
}
|
||||
|
||||
if (adminRoute && !user.isAdmin) {
|
||||
redirect(302, AppRoute.PHOTOS);
|
||||
redirect(307, AppRoute.PHOTOS);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user