cancelacion de una inscripcion
This commit is contained in:
@@ -19,7 +19,7 @@ const inscripcion = async (body, file) => {
|
||||
.then((res) => {
|
||||
if (res) throw new Error('Este folio ya esta registrado');
|
||||
return Inscripcion.findOne({
|
||||
where: { idUsuario, idArea },
|
||||
where: { idUsuario, idArea, cancelacion: 0 },
|
||||
}).then((res) => {
|
||||
if (res) throw new Error('Ya estas registrado en esta área');
|
||||
if (file && folio && body.fechaTicket) {
|
||||
|
||||
@@ -10,7 +10,7 @@ const inscripciones = async (body) => {
|
||||
}).then((res) => {
|
||||
if (!res) return [];
|
||||
return Inscripcion.findAll({
|
||||
where: { idUsuario: body.idUsuario },
|
||||
where: { idUsuario: body.idUsuario, cancelacion: 0 },
|
||||
attributes: [
|
||||
'idInscripcion',
|
||||
'validacion',
|
||||
|
||||
Reference in New Issue
Block a user