From ba27f27275115e2d549e842c242e982d7042cfcd Mon Sep 17 00:00:00 2001 From: mario Date: Mon, 5 Feb 2018 23:13:42 +0200 Subject: [PATCH] remove console logs from code --- src/controllers/events/modify_content.js | 2 -- src/helpers/get_refresh_token.js | 3 --- src/helpers/verify_token.js | 1 - src/middleware/checkLoggedIn.js | 1 - 4 files changed, 7 deletions(-) diff --git a/src/controllers/events/modify_content.js b/src/controllers/events/modify_content.js index 8f57d00..0ce6f20 100644 --- a/src/controllers/events/modify_content.js +++ b/src/controllers/events/modify_content.js @@ -62,8 +62,6 @@ module.exports = (req, res) => { if (error) { return res.status(500).send(res.locals.localText.serverError); } else if (apiResponse.statusCode !== correctResponseStatusCode) { - console.log('im here lad'); - console.log(apiResponseBody); if (apiResponseBody.error === 'Unauthorized') { getRefreshToken(req, res) .then(() => res.status(400).send('Try again')) diff --git a/src/helpers/get_refresh_token.js b/src/helpers/get_refresh_token.js index ed33536..996e67a 100644 --- a/src/helpers/get_refresh_token.js +++ b/src/helpers/get_refresh_token.js @@ -24,8 +24,6 @@ module.exports = (req, res) => { }; return new Promise((resolve, reject) => { Request(options, (error, responseToken, body) => { - console.log('refresh status code', responseToken.statusCode); - console.log(body); if (error || responseToken.statusCode !== 200) { reject(error); } else { @@ -34,7 +32,6 @@ module.exports = (req, res) => { { access_token, refresh_token }, process.env.JWT_SECRET, ); - console.log('TOKEN', token); res.clearCookie('access'); res.cookie('access', token, { maxAge: 604800000 }); resolve(); diff --git a/src/helpers/verify_token.js b/src/helpers/verify_token.js index ed9a474..2348eae 100644 --- a/src/helpers/verify_token.js +++ b/src/helpers/verify_token.js @@ -6,7 +6,6 @@ module.exports = req => { return new Promise((resolve, reject) => { jwt.verify(access, process.env.JWT_SECRET, (error, decoded) => { if (error) { - console.log('holy hell', error); return reject(error); } else { return resolve(decoded); diff --git a/src/middleware/checkLoggedIn.js b/src/middleware/checkLoggedIn.js index 6e7062a..08df6b5 100644 --- a/src/middleware/checkLoggedIn.js +++ b/src/middleware/checkLoggedIn.js @@ -9,7 +9,6 @@ module.exports = (req, res, next) => { const access = req.cookies && req.cookies.access; if (access) { - console.log('worked ?'); verifyToken(req) .then(() => next()) .catch(err => res.redirect(`/${req.params.lang}/login`));