mirror of
https://github.com/Sendouc/sendou.ink.git
synced 2026-05-10 21:00:37 -05:00
15 lines
316 B
TypeScript
15 lines
316 B
TypeScript
import { Prisma } from "@prisma/client";
|
|
import { db } from "~/utils/db.server";
|
|
|
|
export type FindAllMostRecent = Prisma.PromiseReturnType<
|
|
typeof findAllMostRecent
|
|
>;
|
|
export function findAllMostRecent() {
|
|
return db.skill.findMany({
|
|
orderBy: {
|
|
createdAt: "desc",
|
|
},
|
|
distinct: "userId",
|
|
});
|
|
}
|