fix mapper error

This commit is contained in:
Peter Maquiran
2024-06-18 14:24:29 +01:00
parent e0a85ef2ea
commit f0d8af1f70
3 changed files with 5 additions and 5 deletions
@@ -107,8 +107,8 @@ export class EventMapper {
"DayOfWeek": null,
"Month": null,
"LastOccurrence": null,
"frequency": dto.eventRecurrence?.frequency,
"until": dto.eventRecurrence?.until
"frequency": dto?.eventRecurrence?.frequency,
"until": dto?.eventRecurrence?.until
},
"Attachments": dto.attachments.map( e => ({
"Id": e.id,
@@ -170,8 +170,8 @@ export class EventToApproveDetailsMapper {
ApplicationId: e.applicationId,
})),
eventRecurrence: {
frequency: dto.eventRecurrence?.frequency,
until: dto.eventRecurrence?.until
frequency: dto?.eventRecurrence?.frequency,
until: dto?.eventRecurrence?.until
}
}
}
@@ -46,7 +46,7 @@ const EventRecurrenceSchema = z.object({
LastOccurrence: null,
frequency: z.number(),
until: z.string()
});
}).nullable()
export const EventOutputDTOSchema = z.object({