mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-09 20:30:54 -05:00
21 lines
454 B
TypeScript
21 lines
454 B
TypeScript
import { Prisma } from "@prisma/client";
|
|
import prisma from "prisma/client";
|
|
|
|
export type GetAllUsersData = Prisma.PromiseReturnType<typeof getAllUsers>;
|
|
|
|
export const getAllUsers = async () =>
|
|
prisma.user.findMany({
|
|
select: {
|
|
discordId: true,
|
|
username: true,
|
|
discriminator: true,
|
|
discordAvatar: true,
|
|
profile: {
|
|
select: {
|
|
country: true,
|
|
twitterName: true,
|
|
},
|
|
},
|
|
},
|
|
});
|