mirror of
https://github.com/immich-app/immich.git
synced 2024-12-26 10:50:29 +02:00
fix(web): error when refreshing asset view in memory page (#2789)
This commit is contained in:
parent
377cec9fb1
commit
a1b9a1d244
14
web/src/routes/(user)/memory/photos/+page.server.ts
Normal file
14
web/src/routes/(user)/memory/photos/+page.server.ts
Normal file
@ -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');
|
||||
}
|
||||
};
|
0
web/src/routes/(user)/memory/photos/+page.svelte
Normal file
0
web/src/routes/(user)/memory/photos/+page.svelte
Normal file
@ -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');
|
||||
}
|
||||
};
|
Loading…
Reference in New Issue
Block a user