mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-03-30 22:35:00 -05:00
18 lines
426 B
TypeScript
18 lines
426 B
TypeScript
import type { Prisma } from "@prisma/client";
|
|
import { db } from "~/utils/db.server";
|
|
|
|
export type FindTrusters = Prisma.PromiseReturnType<typeof findTrusters>;
|
|
export function findTrusters(userId: string) {
|
|
return db.trustRelationships.findMany({
|
|
where: { trustReceiverId: userId },
|
|
select: {
|
|
trustGiver: {
|
|
select: {
|
|
id: true,
|
|
discordName: true,
|
|
},
|
|
},
|
|
},
|
|
});
|
|
}
|