remove cuestionario from all project. answers validated, time error reports

This commit is contained in:
Your Name
2025-02-17 09:37:37 -06:00
parent 8a24c4368b
commit 5aef8dac66
13 changed files with 273 additions and 148 deletions
+26 -2
View File
@@ -66,19 +66,43 @@ const getOld = async (body) => {
const get = async (body) => {
const version = body.version
const year = validarNumero(body.year, 'año', true, 4);
const path = `server/uploads/${year}_cuestionario_programa.csv`;
const data = [];
let temp
if(version == 'v1'){
return CuestionarioPrograma2.findAll({
temp = CuestionarioPrograma.findAll({
where: {
idCuestionarioPrograma2: {
idCuestionarioPrograma: {
[Op.not]: null,
},
},
})
}
if(version == 'v2'){
temp = CuestionarioPrograma2.findAll({
where: {
idCuestionarioPrograma2: {
[Op.not]: null,
},
},
})
}
return temp
.then(async (res) => {
console.log("segunda parte", res);