mirror of
https://github.com/kremalicious/umami.git
synced 2024-11-15 17:55:08 +01:00
20 lines
348 B
JavaScript
20 lines
348 B
JavaScript
import prisma from 'lib/prisma';
|
|
|
|
export async function getAccounts() {
|
|
return prisma.client.account.findMany({
|
|
orderBy: [
|
|
{ is_admin: 'desc' },
|
|
{
|
|
username: 'asc',
|
|
},
|
|
],
|
|
select: {
|
|
user_id: true,
|
|
username: true,
|
|
is_admin: true,
|
|
created_at: true,
|
|
updated_at: true,
|
|
},
|
|
});
|
|
}
|