umami/queries/admin/account/getAccounts.js

21 lines
364 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,
accountUuid: true,
},
});
}