validar nuermo entero

This commit is contained in:
xXpuma99Xx
2022-01-02 15:07:49 -06:00
parent 9560014865
commit 9fc6e4485a
31 changed files with 98 additions and 73 deletions
+4 -1
View File
@@ -4,7 +4,10 @@ const validar = require(`${helperPath}/validar`);
const Servicio = require('../../db/tablas/Servicio');
const update = async (body, files) => {
const idServicio = validar.validarId(body.idServicio);
const idServicio = validar.validarNumeroEntero(
body.idServicio,
'id servicio'
);
const dataUpdate = {};
return Servicio.findOne({ where: { idServicio } })