High performance self-hosted photo and video management solution.
TypeScript backup-toolfluttergoogle-photosgoogle-photos-alternativejavascriptmobile-appnestjsnodejsphoto-galleryphotosphotos-managementself-hostedsveltesveltekittypescriptvideos
fix: shared link custom URL photo access authentication (#20534)
Gaurav Yadavd430b869ac06
diff --git a/web/src/lib/utils/navigation.ts b/web/src/lib/utils/navigation.tsindex eb974c3f25..642c8165df 100644--- a/web/src/lib/utils/navigation.ts+++ b/web/src/lib/utils/navigation.ts@@ -23,8 +23,8 @@ export const isLockedFolderRoute = (route?: string | null) => !!route?.startsWitexport const isAssetViewerRoute = (target?: NavigationTarget | null) =>!!(target?.route.id?.endsWith('/[[assetId=id]]') && 'assetId' in (target?.params || {}));-export function getAssetInfoFromParam({ assetId, key }: { assetId?: string; key?: string }) {- return assetId ? getAssetInfo({ id: assetId, key }) : undefined;+export function getAssetInfoFromParam({ assetId, slug, key }: { assetId?: string; key?: string; slug?: string }) {+ return assetId ? getAssetInfo({ id: assetId, slug, key }) : undefined;}function currentUrlWithoutAsset() {diff --git a/web/src/lib/utils/shared-links.ts b/web/src/lib/utils/shared-links.tsindex 824554220f..661ccf6090 100644--- a/web/src/lib/utils/shared-links.ts+++ b/web/src/lib/utils/shared-links.ts@@ -17,7 +17,13 @@ export const asQueryString = ({ slug, key }: { slug?: string; key?: string }) =>return params.toString();};-export const loadSharedLink = async ({ url, params }: { url: URL; params: { key?: string; slug?: string } }) => {+export const loadSharedLink = async ({+ url,+ params,+}: {+ url: URL;+ params: { key?: string; slug?: string; assetId?: string };+}) => {const { key, slug } = params;await authenticate(url, { public: true });