nuevos cuestionarios de programa y alumno, sql de update, falta revisar el proceso de servicio para actualizar el get de los id cuestionarios
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
const helperPath = '../../helper';
|
||||
const drive = require(`${helperPath}/drive`);
|
||||
//const drive = require(`${helperPath}/drive`);
|
||||
const validar = require(`${helperPath}/validar`);
|
||||
const Servicio = require('../../db/tablas/Servicio');
|
||||
|
||||
@@ -13,6 +13,8 @@ const update = async (body, files) => {
|
||||
return Servicio.findOne({ where: { idServicio } })
|
||||
.then(async (res) => {
|
||||
if (!res) throw new Error('Este Servicio Social no existe en la db.');
|
||||
|
||||
/*
|
||||
try {
|
||||
if (files['cartaAceptacion'][0].filename)
|
||||
dataUpdate.cartaAceptacion = await drive.uploadFile(
|
||||
@@ -40,6 +42,9 @@ const update = async (body, files) => {
|
||||
res.carpeta
|
||||
);
|
||||
} catch (err) {}
|
||||
*/
|
||||
|
||||
|
||||
if (body.correo) dataUpdate.correo = validar.validarCorreo(body.correo);
|
||||
if (body.fechaInicio)
|
||||
dataUpdate.fechaInicio = validar.validarFecha(
|
||||
|
||||
Reference in New Issue
Block a user