diff --git a/src/models/attendee.ts b/src/models/attendee.ts index 81baf3c..41d238e 100644 --- a/src/models/attendee.ts +++ b/src/models/attendee.ts @@ -88,6 +88,9 @@ export default class Attendee extends Model implements AttendeeModel { } }); - return attributes; + return { + attributes, + type: 'attendees', + }; } } diff --git a/src/resources/appointment.ts b/src/resources/appointment.ts index c0ceca2..019ac10 100644 --- a/src/resources/appointment.ts +++ b/src/resources/appointment.ts @@ -88,12 +88,8 @@ export default class Appointment implements AppointmentResource { protected params(): AppointmentParameters { const attendees = (this.attendees as AttendeeModel[]) .map((attendee: AttendeeModel): object => { - let parameters: object = { - attributes: attendee.toResponse(), - type: 'attendees', - }; - const answers = attendee.getAnswers(); + let parameters: object = attendee.toResponse(); if (answers.length > 0) { parameters = {