Basic User List
This commit is contained in:
12
src/routes/user/list/+page.ts
Normal file
12
src/routes/user/list/+page.ts
Normal file
@@ -0,0 +1,12 @@
|
||||
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 };
|
||||
};
|
||||
Reference in New Issue
Block a user