organización de endpoints

This commit is contained in:
Lemuel Marquez
2021-05-13 14:06:07 -05:00
parent 4bfb659914
commit 0b6bb666c5
38 changed files with 251 additions and 232 deletions
+2 -2
View File
@@ -1,6 +1,6 @@
const helperPath = '../../helper';
const validar = require(`${helperPath}/validar`);
const drive = require(`${helperPath}/drive`);
const validar = require(`${helperPath}/validar`);
const Servicio = require('../../db/tablas/Servicio');
const update = async (body, files) => {
@@ -52,7 +52,7 @@ const update = async (body, files) => {
);
if (body.telefono)
dataUpdate.telefono = validar.validarNumero(body.telefono, 15);
if (validar.isObjectEmpty(dataUpdate))
if (validar.validarObjetoVacio(dataUpdate))
throw new Error(
'No se envio nada para actualizar este Servicio Social'
);