Skip to content

Commit

Permalink
configurando la API url correcta
Browse files Browse the repository at this point in the history
  • Loading branch information
edelCustodio committed Oct 5, 2018
1 parent abf44eb commit b72bb81
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
6 changes: 3 additions & 3 deletions js/client_side/cut.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ require( 'datatables.net-bs4' )();
require( 'datatables.net-responsive-dt' )()
var dt = require( 'datatables.net' )( window, $ );
let apiURL = '';
var port = 51990; // 8080 51990
var port = 8080; // 8080 51990
var _tickets;
var tableTickets;
var tableHistorial;
Expand All @@ -18,8 +18,8 @@ let dpFechaInicio;
let dpFechaFin;

$(document).ready(function() {
// apiURL = 'http://' + sessionStorage.getItem('IPServer') + ':' + port + '/';
apiURL = 'http://localhost:' + port + '/';
apiURL = 'http://' + sessionStorage.getItem('IPServer') + ':' + port + '/';
// apiURL = 'http://localhost:' + port + '/';


fechaInicio = new Date();
Expand Down
12 changes: 6 additions & 6 deletions js/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ var _tickets = [];
var _ticket = {};
var _recordsNoPay = [];
var _idTicket = 0;
var port = 51990; // 8080 51990
var port = 8080; // 8080 51990


/*--------------------------------------
Expand All @@ -23,7 +23,7 @@ var port = 51990; // 8080 51990
/*
* Notifications
*/
function notify(from, align, icon, type, title, message){
function notify(from, align, icon, type, title, message) {
$.growl({
icon: icon,
title: title,
Expand Down Expand Up @@ -93,8 +93,8 @@ function alertExecuteFunction(title, text, type, functionHandle) {
$(document).ready(function () {

if (sessionStorage.getItem('IPServer') !== null) {
// apiURL = 'http://' + sessionStorage.getItem('IPServer') + ':' + port + '/';
apiURL = 'http://localhost:' + port + '/';
apiURL = 'http://' + sessionStorage.getItem('IPServer') + ':' + port + '/';
// apiURL = 'http://localhost:' + port + '/';
} else {
ipcRenderer.send('goForIPServer', 1);
}
Expand All @@ -107,8 +107,8 @@ $(document).ready(function () {
ipcRenderer.on('getForIPServer', (event, arg) => {
var ips = JSON.parse(arg);
sessionStorage.setItem('IPServer', ips.ipServer);
// apiURL = 'http://' + ips.ipServer + ':' + port + '/';
apiURL = 'http://localhost:' + port + '/';
apiURL = 'http://' + ips.ipServer + ':' + port + '/';
// apiURL = 'http://localhost:' + port + '/';
sessionStorage.setItem('IPServer', ips.ipServer);
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "cyber-server",
"main": "main.js",
"version": "0.1.12",
"version": "0.1.13",
"license": "MIT",
"description": "Aplicacion de escritorio para control de un cyber cafe asi como un punto de venta.",
"author": "Edel Custodio Frias",
Expand Down

0 comments on commit b72bb81

Please sign in to comment.