diff options
| author | HumairAK <humair88@hotmail.com> | 2016-07-27 00:18:34 +0000 |
|---|---|---|
| committer | HumairAK <humair88@hotmail.com> | 2016-07-27 00:18:34 +0000 |
| commit | 25706820837bd05cdc3b186eb1d5ebabf9688a61 (patch) | |
| tree | afbc83b902d3f0789d5174bd2e2798937ab57b26 /routes/user.js | |
| parent | 38594fd274a4bebee75ae71dbed457b39d253cae (diff) | |
| parent | 714368c049f8749ed22c6d1d07bb3adc783dc349 (diff) | |
Merge branch 'master' of https://github.com/HumairAK/solutions_repo
Diffstat (limited to 'routes/user.js')
| -rw-r--r-- | routes/user.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/routes/user.js b/routes/user.js index 6e9815e..5ddd4b8 100644 --- a/routes/user.js +++ b/routes/user.js @@ -91,27 +91,27 @@ router.get('/user_profile', loggedIn, isUser, function(req, res, next) { }); } - function solutionsCount() { + /*function solutionsCount() { return new Promise(function (resolve, reject) { dbFile.retrieve_userSolutions_history(req.user.username, function (bool, results) { if (!bool) { error = 'Error: could not retrieve Answered count'; - req.user.answered = 0; resolve(1); } else { - req.user.answered = results.length; console.log("RESULTS: "); console.log(results); resolve(1); } }); }); - } + }*/ + + - getComments().then(getMail).then(solutionsCount).then(function (data) { + getComments().then(getMail).then(function (data) { console.log('got here fere'); - res.render('user_profile_alt', {comments : comments, inbox: inbox, error: error, csrfToken: req.csrfToken()}); + res.render('user_profile_alt', {inbox: inbox, error: error, csrfToken: req.csrfToken()}); }); //res.render('user_profile_alt', {comments : comments, inbox: inbox, csrfToken: req.csrfToken()}); |
