From 89825da1097bb8d6c19cfe05b4f8d5c3e8c1bc27 Mon Sep 17 00:00:00 2001 From: Nicolas Paschoud <nicolas.paschoud@etu.hesge.ch> Date: Wed, 18 Dec 2019 22:54:07 +0100 Subject: [PATCH] Lil log to understand things better --- projet/front/element-style.js | 1 - projet/sql-request.js | 5 ++++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/projet/front/element-style.js b/projet/front/element-style.js index 08c942e..fdebbaf 100644 --- a/projet/front/element-style.js +++ b/projet/front/element-style.js @@ -37,7 +37,6 @@ lng: 6.1459 login: "a" paths: "/a" */ - console.log(infos); el.innerHTML = ` <p>File name : ${infos.file_name}</p> <p>Path : ${infos.paths}</p> diff --git a/projet/sql-request.js b/projet/sql-request.js index 06cb0aa..9559187 100644 --- a/projet/sql-request.js +++ b/projet/sql-request.js @@ -226,7 +226,10 @@ function createPath(path, user, callback) { function getInfo(file_id, login, callback){ const q = `SELECT * FROM Files WHERE file_id='${file_id}';`; con.query(q, (err, resp) => { - if (err) return callback(false, err); + if (err) { + console.log(err); + return callback(false, err); + } return callback(resp, resp); }); } -- GitLab