immich/web/src/routes/admin/user-management/+page.ts

17 lines
424 B
TypeScript
Raw Normal View History

import { authenticate, requestServerInfo } from '$lib/utils/auth';
import { api } from '@api';
import type { PageLoad } from './$types';
export const load = (async () => {
await authenticate({ admin: true });
await requestServerInfo();
const { data: allUsers } = await api.userApi.getAllUsers({ isAll: false });
return {
allUsers,
meta: {
title: 'User Management',
},
};
}) satisfies PageLoad;