fix: add orderBy for fields

This commit is contained in:
Vasily Zubarev
2025-03-23 19:53:46 +01:00
parent 8d37570c44
commit df2d646a47
3 changed files with 6 additions and 3 deletions

View File

@@ -4,7 +4,11 @@ import { Prisma } from "@prisma/client"
import { cache } from "react"
export const getFields = cache(async () => {
return await prisma.field.findMany()
return await prisma.field.findMany({
orderBy: {
createdAt: "asc",
},
})
})
export const createField = async (field: Prisma.FieldCreateInput) => {