Allow user to change admin username.

This commit is contained in:
Mike Cao 2022-04-03 22:25:32 -07:00
parent e31181c676
commit faf6438852
5 changed files with 21 additions and 14 deletions

View file

@ -230,7 +230,16 @@ export async function saveEvent(website_id, session_id, url, event_type, event_v
}
export async function getAccounts() {
return runQuery(prisma.account.findMany());
return runQuery(
prisma.account.findMany({
orderBy: [
{ is_admin: 'desc' },
{
username: 'asc',
},
],
}),
);
}
export async function getAccountById(user_id) {