Skip to content

Commit

Permalink
fix(AM-276): Evitar errores por asignación simultáneas de turnos virt…
Browse files Browse the repository at this point in the history
…uales (#1895)

Co-authored-by: aldoEMatamala <aldo.emanuel.matamla@gmail.com>
  • Loading branch information
aldoEMatamala and aldoEMatamala committed Jun 18, 2024
1 parent 7bbf014 commit d4b1277
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion modules/turnos/routes/turno.ts
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ router.patch('/turno/:idTurno/bloque/:idBloque/agenda/:idAgenda/', async (req: a
return next('No quedan turnos del tipo ' + tipoTurno);
}
}

if (req.body.emitidoPor && (req.body.emitidoPor === 'appMobile') && countBloques['mobile'] === 0) {
return next('Lo sentimos, ya no quedan más turnos para consumir desde la aplicación');
}
// Verifica si el turno se encuentra todavia disponible
// Si quedan turnos
const update: any = {};
Expand Down

0 comments on commit d4b1277

Please sign in to comment.