1
0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-03-27 02:12:34 +01:00
immich/web/src/routes/(user)/user-settings/+page.ts
2024-06-29 11:29:56 -05:00

20 lines
476 B
TypeScript

import { authenticate } from '$lib/utils/auth';
import { getFormatter } from '$lib/utils/i18n';
import { getApiKeys, getSessions } from '@immich/sdk';
import type { PageLoad } from './$types';
export const load = (async () => {
await authenticate();
const keys = await getApiKeys();
const sessions = await getSessions();
const $t = await getFormatter();
return {
keys,
sessions,
meta: {
title: $t('settings'),
},
};
}) satisfies PageLoad;