mirror of
https://github.com/marcogll/TaxHacker_s23.git
synced 2026-01-13 13:25:18 +00:00
feat: update landing page with current screenshots
This commit is contained in:
@@ -46,6 +46,16 @@ export const updateCategory = async (userId: string, code: string, category: Cat
|
||||
}
|
||||
|
||||
export const deleteCategory = async (userId: string, code: string) => {
|
||||
await prisma.transaction.updateMany({
|
||||
where: {
|
||||
userId,
|
||||
categoryCode: code,
|
||||
},
|
||||
data: {
|
||||
categoryCode: null,
|
||||
},
|
||||
})
|
||||
|
||||
return await prisma.category.delete({
|
||||
where: { userId_code: { userId, code } },
|
||||
})
|
||||
|
||||
@@ -46,6 +46,16 @@ export const updateProject = async (userId: string, code: string, project: Proje
|
||||
}
|
||||
|
||||
export const deleteProject = async (userId: string, code: string) => {
|
||||
await prisma.transaction.updateMany({
|
||||
where: {
|
||||
userId,
|
||||
projectCode: code,
|
||||
},
|
||||
data: {
|
||||
projectCode: null,
|
||||
},
|
||||
})
|
||||
|
||||
return await prisma.project.delete({
|
||||
where: { userId_code: { code, userId } },
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user