refactor(console.log): delete console.log

This commit is contained in:
Alex Moreno 2021-10-14 07:44:42 +02:00
parent b031dcf9c7
commit ba2fbd7230
4 changed files with 3 additions and 20 deletions

View File

@ -2,11 +2,8 @@ const con = require('./connect');
function selectCollectionSmartTag(collectionFk, callback) {
let consSql = `SELECT * FROM vn.collectionSmartTag WHERE collectionFk = ${collectionFk};`;
console.log(consSql);
con.con.query(consSql, function(err, result, fields) {
console.log(result);
callback(null, result);
console.log(result);
});
}

View File

@ -11,10 +11,8 @@ router.get('/:smartTagFk&:shelving&:level', async(req, res) => {
const smartTagFk = req.params.smartTagFk;// valido = "A0A3B82"+ 4 CARACTERES HEXADECIMALES (0-F)
const shelving = req.params.shelving;// valido = 3 CARACTERES LETRAS (A-Z)
const level = req.params.level;
console.log(smartTagFk);
console.log(shelving + level);
const result = bindShelvingTag(smartTagFk, shelving, level);
if (result == 'INVALID_PLATE')
res.json({message: 'MATRICULA INCORRECTA'});
else if (result == 'INVALID_TAG_CODE')
@ -66,9 +64,7 @@ async function insertShelving(shelvingId, smartTagFk) {
'Authorization': key
}
});
console.log(config.storeId);
await bindShelving(smartTagFk, shelvingId);
console.log('Insert Shelving:', body);
})();
})();
}
@ -93,7 +89,6 @@ async function bindShelving(smartTagFk, shelvingId) {
'Authorization': key
}
});
console.log('Bind', body);
})();
})();
}

View File

@ -5,7 +5,7 @@ const select = require('../db/selectCollection');
router.get('/:collectionFk', async(req, res) => {
const collectionFk = req.params.collectionFk;
console.log(collectionFk);
ticketShelving(collectionFk);
res.json({message: 'SUCCESS'});
});
@ -13,14 +13,11 @@ module.exports = router;
function ticketShelving(collectionFk) {// parametro collectionFk
select.selectCollectionSmartTag(collectionFk, function(err, data) {
console.log('DATA', data);
insertTicket(data);
});
}
function insertTicket(consultaSql) {
console.log('CONSULTASQL:', consultaSql);
console.log('CONSULTASQL_TAMAÑO:', consultaSql.length);
const dataLogIn = require('../server');
const got = require('got');
(async() => {
@ -30,7 +27,6 @@ function insertTicket(consultaSql) {
(async() => {
for (let i = 0; i < consultaSql.length; i++) {
console.log('SHELVING: ', consultaSql[i].shelvingFk, consultaSql[i].level);
const {body} = await got.post('http://app.etiquetaselectronicas.com:9999/item/batchImportItem', { // eslint-disable-line
json: {
agencyId: currentUser.agencyId,
@ -57,8 +53,6 @@ function insertTicket(consultaSql) {
'Authorization': key
}
});
// insertTicketDB.insertTicket(consultaSql[i].ticketFk, consultaSql[i].code); // Seguramente esto sobra
console.log(i, body);
}
})();
})();

View File

@ -5,7 +5,7 @@ const config = require('../config');
router.get('/:ticket', async(req, res) => {
const ticket = req.params.ticket;
// console.log(ticket);
searchTicket(ticket);
res.json({message: 'SUCCESS'});
});
@ -19,7 +19,6 @@ function searchTicket(ticket) {// parametro ticketFk
}
function insertFlash(qrySql) {
// console.log('CONSULTASQL_TAMAÑO:', consultaSql.length);
const dataLogIn = require('../server');
const got = require('got');
(async() => {
@ -40,8 +39,6 @@ function insertFlash(qrySql) {
'Authorization': key
}
});
console.log(qrySql[0].shelvingFk + qrySql[0].level);
console.log(body);
})();
})();
}