mirror of
https://github.com/KevinMidboe/immich.git
synced 2025-12-07 19:59:07 +00:00
feat: facial recognition (#2180)
This commit is contained in:
21
web/src/routes/(user)/people/[personId]/+page.server.ts
Normal file
21
web/src/routes/(user)/people/[personId]/+page.server.ts
Normal file
@@ -0,0 +1,21 @@
|
||||
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, '/auth/login');
|
||||
}
|
||||
|
||||
const { data: person } = await locals.api.personApi.getPerson(params.personId);
|
||||
const { data: assets } = await locals.api.personApi.getPersonAssets(params.personId);
|
||||
|
||||
return {
|
||||
user,
|
||||
assets,
|
||||
person,
|
||||
meta: {
|
||||
title: person.name || 'Person'
|
||||
}
|
||||
};
|
||||
}) satisfies PageServerLoad;
|
||||
Reference in New Issue
Block a user