mirror of
https://github.com/vas3k/TaxHacker.git
synced 2026-01-05 21:20:53 -06:00
fix: add orderBy for fields
This commit is contained in:
@@ -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) => {
|
||||
|
||||
@@ -12,7 +12,6 @@ export const getSettings = cache(async (): Promise<SettingsMap> => {
|
||||
})
|
||||
|
||||
export const updateSettings = cache(async (code: string, value?: any) => {
|
||||
console.log("updateSettings", code, value)
|
||||
return await prisma.setting.upsert({
|
||||
where: { code },
|
||||
update: { value },
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "taxhacker",
|
||||
"version": "0.2.0",
|
||||
"version": "0.2.1",
|
||||
"private": true,
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
|
||||
Reference in New Issue
Block a user