organización de endpoints
This commit is contained in:
@@ -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'
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user