mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-09 20:30:54 -05:00
13 lines
317 B
TypeScript
13 lines
317 B
TypeScript
import { Prisma } from "@prisma/client";
|
|
import prisma from "prisma/client";
|
|
|
|
export type GetBuildsByUserData = Prisma.PromiseReturnType<
|
|
typeof getBuildsByUser
|
|
>;
|
|
|
|
export const getBuildsByUser = async (userId: number) =>
|
|
prisma.build.findMany({
|
|
where: { userId },
|
|
orderBy: [{ updatedAt: "desc" }],
|
|
});
|