mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 13:25:18 +00:00
feat: use structured output, import CSV, bugfixes
This commit is contained in:
@@ -11,6 +11,12 @@ export const getCategories = cache(async () => {
|
||||
})
|
||||
})
|
||||
|
||||
export const getCategoryByCode = cache(async (code: string) => {
|
||||
return await prisma.category.findUnique({
|
||||
where: { code },
|
||||
})
|
||||
})
|
||||
|
||||
export const createCategory = async (category: Prisma.CategoryCreateInput) => {
|
||||
if (!category.code) {
|
||||
category.code = codeFromName(category.name as string)
|
||||
|
||||
Reference in New Issue
Block a user