From 796653580c351c405c4537baaf069dfed653f76a Mon Sep 17 00:00:00 2001 From: alexmorenograu <61759297+alexmorenograu@users.noreply.github.com> Date: Thu, 18 Mar 2021 11:51:40 +0100 Subject: [PATCH] delete console.log --- db/create.js | 1 - db/insertDB.js | 2 -- db/maxWagon.js | 1 - db/populateDb.js | 2 -- db/selectDB.js | 1 - methods/bindShelvingTag.js | 8 ++------ 6 files changed, 2 insertions(+), 13 deletions(-) diff --git a/db/create.js b/db/create.js index 2bcc788..a612628 100644 --- a/db/create.js +++ b/db/create.js @@ -6,6 +6,5 @@ con.con.connect(function(err) { let sql = 'CREATE TABLE smartTag2 (code VARCHAR(100) PRIMARY KEY, shelvingFk VARCHAR(10) FOREIGN KEY REFERENCES vn.shelving(code), level INT(11))'; con.con.query(sql, function(err, result) { if (err) throw err; - console.log('Table created'); }); }); diff --git a/db/insertDB.js b/db/insertDB.js index 88a6c5d..4eebd09 100644 --- a/db/insertDB.js +++ b/db/insertDB.js @@ -3,7 +3,6 @@ const con = require('./connect'); function insertDB(barcode, shelving, level) { con.con.connect(function(err) { if (err) throw err; - // console.log("Connected!"); let sql = `IF EXISTS(SELECT * FROM vn.smartTag WHERE code='${barcode}') THEN UPDATE vn.smartTag @@ -16,7 +15,6 @@ function insertDB(barcode, shelving, level) { END IF;`; con.con.query(sql, function(err, result) { if (err) throw err; - // console.log("1 record inserted"); }); }); } diff --git a/db/maxWagon.js b/db/maxWagon.js index f6bb291..66f44cb 100644 --- a/db/maxWagon.js +++ b/db/maxWagon.js @@ -5,7 +5,6 @@ function maxWagon(collectionFk, callback) { FROM ticketCollection tc WHERE tc.collectionFk = ${collectionFk}`; con.con.query(consSql, function(err, result, fields) { - console.log(result); callback(null, result); }); } diff --git a/db/populateDb.js b/db/populateDb.js index fb9de95..51c2e20 100644 --- a/db/populateDb.js +++ b/db/populateDb.js @@ -2,7 +2,6 @@ const con = require('./connect'); con.con.connect(function(err) { if (err) throw err; - console.log('Connected!'); let sql = `INSERT INTO vn.smartTag (code, shelvingFk, level) VALUES ('A0A3B8288AB1', 'ABC', 1), ('A0A3B8288AB2', 'ABC', 2), @@ -15,6 +14,5 @@ con.con.connect(function(err) { ;`; con.con.query(sql, function(err, result) { if (err) throw err; - console.log('records inserted'); }); }); diff --git a/db/selectDB.js b/db/selectDB.js index 54728b6..2b9e69d 100644 --- a/db/selectDB.js +++ b/db/selectDB.js @@ -9,7 +9,6 @@ function select(collectionFk, callback) { ORDER BY tc.wagon, tc.level`; con.con.query(consSql, function(err, result, fields) { - console.log(result); callback(null, result); }); } diff --git a/methods/bindShelvingTag.js b/methods/bindShelvingTag.js index eedcdc5..0ddf9c7 100644 --- a/methods/bindShelvingTag.js +++ b/methods/bindShelvingTag.js @@ -30,14 +30,10 @@ function bindShelvingTag(barcode, shelving, level) { insertShelving(shelvingId); bindShelving(barcode, shelvingId); insertDB.insertDB(barcode, shelving, level); - } else { - // console.log("¡MATRICULA INCORRECTA!"); + } else return 'INVALID_PLATE'; - } - } else { - // console.log("¡CODIGO DE ETIQUETA INCORRECTO!") + } else return 'INVALID_TAG_CODE'; - } } function insertShelving(shelvingId) {