Compare commits

..

1 commit

Author SHA1 Message Date
a36ea0cb6b
fix(api): update paths in Swagger documentation to include '/api' prefix
Some checks failed
container-scan / Container Scan (pull_request) Failing after 31s
docker-build / docker (pull_request) Failing after 4m46s
2025-06-19 20:29:04 +02:00
2 changed files with 13 additions and 27 deletions

View file

@ -229,23 +229,6 @@ export const PATCH = auth(async (req, { params }) => {
participants,
} = data.data;
if (participants !== undefined)
for (const participant of participants) {
await prisma.meetingParticipant.upsert({
where: {
meeting_id_user_id: {
user_id: participant,
meeting_id: eventID,
},
},
create: {
user_id: participant,
meeting_id: eventID,
},
update: {},
});
}
const updatedEvent = await prisma.meeting.update({
where: {
id: eventID,
@ -257,16 +240,18 @@ export const PATCH = auth(async (req, { params }) => {
end_time,
location,
status,
participants:
participants !== undefined
? {
deleteMany: {
user_id: {
notIn: participants || [],
},
},
}
: {},
participants: !participants
? undefined
: {
deleteMany: {
user_id: {
notIn: participants,
},
},
create: participants.map((participant) => ({
user_id: participant,
})),
},
},
select: {
id: true,

View file

@ -113,6 +113,7 @@ export const createEventSchema = zod
// ----------------------------------------
export const updateEventSchema = zod
.object({
id: eventIdSchema,
title: eventTitleSchema.optional(),
description: eventDescriptionSchema.optional(),
start_time: eventStartTimeSchema.optional(),