This commit is contained in:
xXpuma99Xx
2021-09-24 12:32:48 -05:00
6 changed files with 45 additions and 12 deletions
+4 -3
View File
@@ -18,10 +18,9 @@ const multar = async (body) => {
);
let prestamo = {};
let fechaFin = moment();
return Operador.findOne({ where: { idOperador: idOperadorMulta } })
.then((res) => {
if (!res) throw new Error('No existe esta este operador.');
if (!res) throw new Error('No existe este operador.');
return Infraccion.findOne({ where: { idInfraccion } });
})
.then((res) => {
@@ -55,7 +54,9 @@ const multar = async (body) => {
idPrestamo,
})
)
.then((res) => ({ message: `Se levantó correctamente el reporte de multa.` }));
.then((res) => ({
message: `Se levantó correctamente el reporte de multa.`,
}));
};
module.exports = multar;