mirror of
https://github.com/BradNut/umami
synced 2025-09-08 17:40:29 +00:00
23 lines
420 B
JavaScript
23 lines
420 B
JavaScript
|
|
import { runQuery } from 'queries';
|
||
|
|
import prisma from 'lib/db';
|
||
|
|
|
||
|
|
export async function getAccounts() {
|
||
|
|
return runQuery(
|
||
|
|
prisma.account.findMany({
|
||
|
|
orderBy: [
|
||
|
|
{ is_admin: 'desc' },
|
||
|
|
{
|
||
|
|
username: 'asc',
|
||
|
|
},
|
||
|
|
],
|
||
|
|
select: {
|
||
|
|
user_id: true,
|
||
|
|
username: true,
|
||
|
|
is_admin: true,
|
||
|
|
created_at: true,
|
||
|
|
updated_at: true,
|
||
|
|
},
|
||
|
|
}),
|
||
|
|
);
|
||
|
|
}
|