Data/Users: Sort users by username
This commit is contained in:
@ -3,7 +3,9 @@ import type { LayoutServerLoad } from "./$types";
|
||||
|
||||
export const load: LayoutServerLoad = async ({ fetch, locals }) => {
|
||||
const fetch_users = async (): Promise<User[]> => {
|
||||
const users: User[] = await locals.pb.collection("users").getFullList({ fetch: fetch });
|
||||
const users: User[] = await locals.pb
|
||||
.collection("users")
|
||||
.getFullList({ fetch: fetch, sort: "+username" });
|
||||
|
||||
users.map((user: User) => {
|
||||
user.avatar_url = locals.pb.files.getURL(user, user.avatar);
|
||||
|
Reference in New Issue
Block a user