mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-08 20:29:05 +00:00
* fix: suggest people * feat: remove hidden people * add hidden people when merging faces * pr feedback * fix: don't use reactive statement * fixed section height * improve merging * fix: migration * fix migration * feat: add asset count * fix: test * rename endpoint * add server test * improve responsive design * fix: remove videos from live photos in the asset count * pr feedback * fix: rename asset count endpoint * fix: return firstname and lastname * fix: reset people only on error * fix: search * fix: responsive design & div flickering * fix: cleanup * chore: open api --------- Co-authored-by: Jason Rasmussen <jrasm91@gmail.com>
23 lines
631 B
TypeScript
23 lines
631 B
TypeScript
import { AppRoute } from '$lib/constants';
|
|
import { redirect } from '@sveltejs/kit';
|
|
import type { PageServerLoad } from './$types';
|
|
|
|
export const load = (async ({ locals, parent, params }) => {
|
|
const { user } = await parent();
|
|
if (!user) {
|
|
throw redirect(302, AppRoute.AUTH_LOGIN);
|
|
}
|
|
|
|
const { data: person } = await locals.api.personApi.getPerson({ id: params.personId });
|
|
const { data: statistics } = await locals.api.personApi.getPersonStatistics({ id: params.personId });
|
|
|
|
return {
|
|
user,
|
|
person,
|
|
statistics,
|
|
meta: {
|
|
title: person.name || 'Person',
|
|
},
|
|
};
|
|
}) satisfies PageServerLoad;
|