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:
Your Name
2025-01-22 11:24:19 -06:00
parent 2fc5c1f5fa
commit bea8a7b266
25 changed files with 3114 additions and 2156 deletions
+6 -1
View File
@@ -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(