validar número

This commit is contained in:
xXpuma99Xx
2022-01-02 18:25:31 -06:00
parent 9a982a215f
commit 481096e851
12 changed files with 54 additions and 15 deletions
@@ -11,7 +11,7 @@ const Programa = require(`${dbPath}/Programa`);
const Usuario = require(`${dbPath}/Usuario`);
const get = async (body) => {
const year = validarNumero(body.year, 4);
const year = validarNumero(body.year, 'año', true, 4);
const path = `server/uploads/${year}_cuestionario_programa.csv`;
const data = [];