mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
19 lines
339 B
JavaScript
19 lines
339 B
JavaScript
import prisma from 'lib/prisma';
|
|
|
|
export async function getAccounts() {
|
|
return prisma.client.account.findMany({
|
|
orderBy: [
|
|
{ isAdmin: 'desc' },
|
|
{
|
|
username: 'asc',
|
|
},
|
|
],
|
|
select: {
|
|
id: true,
|
|
username: true,
|
|
isAdmin: true,
|
|
createdAt: true,
|
|
updatedAt: true,
|
|
},
|
|
});
|
|
}
|