diff --git a/web/src/routes/(user)/memory/photos/+page.server.ts b/web/src/routes/(user)/memory/photos/+page.server.ts new file mode 100644 index 0000000000..a549893172 --- /dev/null +++ b/web/src/routes/(user)/memory/photos/+page.server.ts @@ -0,0 +1,14 @@ +import { redirect } from '@sveltejs/kit'; +export const prerender = false; + +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ parent }) => { + const { user } = await parent(); + + if (!user) { + throw redirect(302, '/auth/login'); + } else { + throw redirect(302, '/memory'); + } +}; diff --git a/web/src/routes/(user)/memory/photos/+page.svelte b/web/src/routes/(user)/memory/photos/+page.svelte new file mode 100644 index 0000000000..e69de29bb2 diff --git a/web/src/routes/(user)/memory/photos/[assetId]/+page.server.ts b/web/src/routes/(user)/memory/photos/[assetId]/+page.server.ts new file mode 100644 index 0000000000..a549893172 --- /dev/null +++ b/web/src/routes/(user)/memory/photos/[assetId]/+page.server.ts @@ -0,0 +1,14 @@ +import { redirect } from '@sveltejs/kit'; +export const prerender = false; + +import type { PageServerLoad } from './$types'; + +export const load: PageServerLoad = async ({ parent }) => { + const { user } = await parent(); + + if (!user) { + throw redirect(302, '/auth/login'); + } else { + throw redirect(302, '/memory'); + } +}; diff --git a/web/src/routes/(user)/memory/photos/[assetId]/+page.svelte b/web/src/routes/(user)/memory/photos/[assetId]/+page.svelte new file mode 100644 index 0000000000..e69de29bb2