Added location to database, model, and event templates

This commit is contained in:
Alexis
2024-06-06 22:43:31 +02:00
parent c6009a4bca
commit e63422f091
11 changed files with 98 additions and 30 deletions

View File

@@ -34,12 +34,22 @@ export default defineEventHandler(async (event) => {
try {
const { data, error } = await client
.from('calendar_events')
.update({ start_date: bodyData?.event.startDate, end_date: bodyData.event.endDate, title: bodyData?.event.title, description: bodyData.event.description, calendar_id: bodyData?.calendarId } as never)
.update(
{
start_date: bodyData?.event.startDate,
end_date: bodyData.event.endDate,
title: bodyData?.event.title,
description: bodyData.event.description,
location: bodyData.event.location,
calendar_id: bodyData?.calendarId
} as never
)
.eq('id', params.id)
.select(`
id,
title,
description,
location,
hidden,
startDate:start_date,
endDate:end_date,