file, monto y folio para poder inscribir
This commit is contained in:
@@ -14,7 +14,7 @@ const inscripcion = async (body, file) => {
|
||||
const idUsuario = validarNumeroEntero(body.idUsuario, 'id Usuario', true);
|
||||
const idArea = validarNumeroEntero(body.idArea, 'id Area', true);
|
||||
const monto = validarNumero(body.monto, 'monto', true);
|
||||
const folio = validarAlfanumerico(body.folio, 'folio', true);
|
||||
const folio = body.folio;
|
||||
|
||||
return Inscripcion.findOne({
|
||||
where: { folio },
|
||||
@@ -25,7 +25,7 @@ const inscripcion = async (body, file) => {
|
||||
where: { idUsuario, idArea },
|
||||
}).then((res) => {
|
||||
if (res) throw new Error('Ya estas registrado en esta área');
|
||||
if (file) {
|
||||
if (file && monto && folio) {
|
||||
return Inscripcion.create({
|
||||
idUsuario,
|
||||
idArea,
|
||||
|
||||
Reference in New Issue
Block a user