escolares sybase node

This commit is contained in:
2021-02-15 11:57:05 -06:00
parent d2718e198f
commit a862ee137a
2 changed files with 10 additions and 15 deletions
+7 -5
View File
@@ -1,4 +1,5 @@
require('../../config/config');
const sybase = require('../../config/sybase');
const validar = require('../../helper/validar');
const axios = require('axios');
const Usuario = require('../../db/tablas/Usuario');
@@ -8,11 +9,12 @@ const escolares = async (body) => {
const numeroCuenta = validar.validarNumeroCuenta(body.numeroCuenta);
let alumno;
return axios({
method: 'post',
url: `${process.env.ESCOLARES}${numeroCuenta}`,
data: `${process.env.ESCOLARES_PASS}`,
})
// return axios({
// method: 'post',
// url: `${process.env.ESCOLARES}${numeroCuenta}`,
// data: `${process.env.ESCOLARES_PASS}`,
// })
return sybase(numeroCuenta)
.then((res) => {
if (!res.data.nombre || !res.data.carrconst || !res.data.avance)
throw new Error(