Await
This commit is contained in:
parent
2bef00a3c0
commit
59b60e9ca6
@ -423,17 +423,19 @@ const extraControllers = {
|
||||
|
||||
try {
|
||||
if (eventReservation.state === 'publish' && eventReservation.assistants != NewReservarionAssistants) {
|
||||
|
||||
if (NewReservarionAssistants < eventReservation.confirmed) {
|
||||
return handleResultResponse("Error el número de asistentes no puede ser menor que el de confirmados", null, params, res, httpStatus.NOT_FOUND);
|
||||
};
|
||||
|
||||
const cantidad = (NewReservarionAssistants - eventReservation.assistants);
|
||||
eventService._updateAforoOfEventReservation(eventReservation, cantidad);
|
||||
await eventService._updateAforoOfEventReservation(eventReservation, cantidad);
|
||||
}
|
||||
|
||||
next();
|
||||
|
||||
} catch (error) {
|
||||
console.log('>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>', error.stack);
|
||||
return handleResultResponse("Error al checkAssitantsUpdate de la reserva", null, params, res, httpStatus.NOT_FOUND);
|
||||
}
|
||||
},
|
||||
|
||||
Loading…
Reference in New Issue
Block a user