1
0
mirror of https://github.com/Fayorg/calendrier-avant.git synced 2026-05-28 01:28:37 +02:00
This commit is contained in:
2024-08-15 21:08:38 -04:00
parent d21aaa1757
commit 4e7dede837
2 changed files with 33 additions and 1 deletions

View File

@@ -8,7 +8,9 @@ interface GetAccountsParameters {
skip?: number;
}
export async function getAccounts(args?: GetAccountsParameters): Promise<Pick<Users, "id" | "firstName" | "lastName" | "isAdmin" | "isTeacher">[]> {
export type Account = Pick<Users, "id" | "firstName" | "lastName" | "isAdmin" | "isTeacher">;
export async function getAccounts(args?: GetAccountsParameters): Promise<Account[]> {
return await prisma.users.findMany({
take: args?.take,
skip: args?.skip,