Files
immich/web/src/routes/(user)/photos/[[assetId=id]]/+page.ts
T
2025-05-15 14:45:23 -04:00

18 lines
464 B
TypeScript

import { authenticate } from '$lib/utils/auth';
import { getFormatter } from '$lib/utils/i18n';
import { getAssetInfoFromParam } from '$lib/utils/navigation';
import type { PageLoad } from './$types';
export const load = (async ({ params, url }) => {
await authenticate(url);
const asset = await getAssetInfoFromParam(params);
const $t = await getFormatter();
return {
asset,
meta: {
title: $t('photos'),
},
};
}) satisfies PageLoad;