mirror of
https://github.com/ArthurDanjou/arthome.git
synced 2026-02-05 05:17:49 +01:00
Working
This commit is contained in:
@@ -8,12 +8,7 @@ export default defineEventHandler(async (event) => {
|
||||
const body = await useValidatedBody(event, UpdateCategorySchema)
|
||||
await useDrizzle()
|
||||
.update(tables.categories)
|
||||
.set({
|
||||
name: body.name,
|
||||
icon: body.icon,
|
||||
color: body.color,
|
||||
nameVisible: body.nameVisible,
|
||||
})
|
||||
.set(body)
|
||||
.where(
|
||||
and(
|
||||
eq(tables.categories.id, id),
|
||||
|
||||
Reference in New Issue
Block a user