mirror of
https://github.com/immich-app/immich.git
synced 2025-01-01 08:31:59 +00:00
fix(web): error when refreshing asset view in memory page (#2789)
This commit is contained in:
parent
377cec9fb1
commit
a1b9a1d244
4 changed files with 28 additions and 0 deletions
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 a new issue