From bb4cf69ca4deff7088aa35d61eac564c3b125481 Mon Sep 17 00:00:00 2001 From: Marcelo Sanchez Date: Tue, 3 Feb 2026 16:26:04 -0500 Subject: [PATCH] _ --- funtions.js | 10 +++++----- metodos.js | 1 + 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/funtions.js b/funtions.js index 048d808..6376547 100644 --- a/funtions.js +++ b/funtions.js @@ -116,7 +116,7 @@ async function CerrarSession(session) { async function RegistrarSession(session_id, cedula) { return new Promise((resolve, reject) => { - var heders = { 'cedula': cedula, 'name': cedula, 'session_id': session_id }; + var heders = { 'cedula': String(cedula), 'name': cedula, 'session_id': session_id }; var array = { 'ok': false, 'data': [], 'msg': null }; AxiosPOST('apidf_RegistrarSessionDialog', heders).then(function (result) { if (result['estado']) { @@ -159,11 +159,10 @@ async function ConsultaClaves(cedula, chang = null) { return new Promise((resolve, reject) => { var array = { 'ok': false, 'data': [], 'msg': null }; var _ur = 'consulta_predios_detalle/2/' + cedula + '?boot=true'; - console.log(_ur); if (chang != null) { var _ur = 'consulta_predios_detalle/1/' + cedula + '?boot=true'; } - AxiosPOST(_ur, {}, API_TOKEN_PORTAL).then(function (result) { + AxiosPOST(_ur, {'api_token' : API_TOKEN_PORTAL}, API_TOKEN_PORTAL).then(function (result) { if (result['ok']) { array['ok'] = true; array['data'] = result['data_bot']; @@ -186,6 +185,7 @@ async function ConsultaTasaRecoleccion(documento, type = 2) { let params = { boot: true, tipo_doc: type, + api_token : API_TOKEN_PORTAL, valor: documento, } AxiosPOST(_ur, params, API_TOKEN_PORTAL).then(function (result) { @@ -275,9 +275,9 @@ async function ConsultaNoticias() { async function OptInfoBot(key_inf) { return new Promise((resolve, reject) => { - var heders = { 'info_key': key_inf }; + var heders = { 'info_key': key_inf, 'api_token' : API_TOKEN_PORTAL }; var array = { 'ok': false, 'data': [], 'msg': null }; - AxiosPOST('api/InfoBootService', heders).then(function (result) { + AxiosPOST('api/InfoBootService', heders, API_TOKEN_PORTAL).then(function (result) { if (result['ok']) { array['ok'] = true; array['data'] = result['data']; array['msg'] = result['msg']; } else { array['msg'] = result['msg'] } diff --git a/metodos.js b/metodos.js index bd05d57..0b7c47e 100644 --- a/metodos.js +++ b/metodos.js @@ -23,6 +23,7 @@ async function Fun_SolicitarDatosAgent(agent, req, res) { try { const sessionId = req.body.session.split("/").reverse()[0]; let data_context = await ValidateDataUserContext(agent); + console.log(data_context); if (data_context) { var megg = null; if (data_context != null && data_context != "") {