Added category schema validation

This commit is contained in:
Alexis
2024-06-10 20:43:05 +02:00
parent a1aa512018
commit 69f18e9338
4 changed files with 11 additions and 6 deletions

View File

@@ -41,7 +41,7 @@ export default defineEventHandler(async (event) => {
description: bodyData.event.description,
location: bodyData.event.location,
hidden: bodyData.event.hidden,
category: bodyData.event.category.id,
category: bodyData.event.category?.id,
calendar_id: bodyData?.calendarId
} as never
)

View File

@@ -26,7 +26,7 @@ export default defineEventHandler(async (event) => {
description: bodyData.event.description,
location: bodyData.event.location,
hidden: bodyData.event.hidden,
category: bodyData.event.category.id,
category: bodyData.event.category?.id,
calendar_id: bodyData?.calendarId
} as never
)