mirror of
https://github.com/immich-app/immich.git
synced 2026-05-18 03:10:24 +03:00
fix(web): redirect to login (#25254)
This commit is contained in:
@@ -1,7 +1,9 @@
|
||||
import { getAssetInfoFromParam } from '$lib/utils/navigation';
|
||||
import { authenticate } from '$lib/utils/auth';
|
||||
import { getAssetInfoFromParam, isSharedLinkRoute } from '$lib/utils/navigation';
|
||||
import type { LayoutLoad } from './$types';
|
||||
|
||||
export const load = (async ({ params }) => {
|
||||
export const load = (async ({ url, params, route }) => {
|
||||
await authenticate(url, { public: isSharedLinkRoute(route.id) });
|
||||
const asset = await getAssetInfoFromParam(params);
|
||||
|
||||
return {
|
||||
|
||||
Reference in New Issue
Block a user