_
This commit is contained in:
parent
997fd95f73
commit
bb4cf69ca4
10
funtions.js
10
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'] }
|
||||
|
||||
@ -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 != "") {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user