Skip to content

Commit

Permalink
remove console logs from code
Browse files Browse the repository at this point in the history
  • Loading branch information
Karyum committed Feb 5, 2018
1 parent cc22367 commit ba27f27
Show file tree
Hide file tree
Showing 4 changed files with 0 additions and 7 deletions.
2 changes: 0 additions & 2 deletions src/controllers/events/modify_content.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'))
Expand Down
3 changes: 0 additions & 3 deletions src/helpers/get_refresh_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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();
Expand Down
1 change: 0 additions & 1 deletion src/helpers/verify_token.js
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down
1 change: 0 additions & 1 deletion src/middleware/checkLoggedIn.js
Original file line number Diff line number Diff line change
Expand Up @@ -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`));
Expand Down

0 comments on commit ba27f27

Please sign in to comment.