Files
re-user-test-svlkt/src/routes/user/list/+page.ts

12 lines
354 B
TypeScript

import type { PageLoad } from './$types';
import type { UserShort } from "./types";
export const load: PageLoad = async ({ fetch }) => {
const res = await fetch("/api/internal/current/users/?limit=100&is_readonly=0", {
headers: {
'Accept': 'application/json',
}
});
const users: UserShort[] = await res.json();
return { users };
};