mirror of
https://github.com/immich-app/immich.git
synced 2026-05-25 09:02:31 -04:00
a16d233a0c
* feat: sort imports * fix: something?
20 lines
560 B
TypeScript
20 lines
560 B
TypeScript
import { getServerStatistics, searchUsersAdmin } from '@immich/sdk';
|
|
import { authenticate } from '$lib/utils/auth';
|
|
import { getFormatter } from '$lib/utils/i18n';
|
|
import type { PageLoad } from './$types';
|
|
|
|
export const load = (async ({ url }) => {
|
|
await authenticate(url, { admin: true });
|
|
const statsPromise = getServerStatistics();
|
|
const users = await searchUsersAdmin({ withDeleted: false });
|
|
const $t = await getFormatter();
|
|
|
|
return {
|
|
statsPromise,
|
|
users,
|
|
meta: {
|
|
title: $t('server_stats'),
|
|
},
|
|
};
|
|
}) satisfies PageLoad;
|