diff options
Diffstat (limited to 'node_simple.js')
| -rw-r--r-- | node_simple.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/node_simple.js b/node_simple.js index e798bd2..a3d0f6e 100644 --- a/node_simple.js +++ b/node_simple.js @@ -323,7 +323,8 @@ exports.retrieveFollows = function (user_name, callback) { /** * This function will retrieve ALL the comments a user has ever made. - * It returns an array containing objects of the form: {exam_id, comment, date}. + * It returns an array containing objects of the form: {exam_id, comment, date, ... + * course_code, year, term}. * Note: a comment should only exist IF a solution exists. * * @param {string} user_name: the unique user name for the user @@ -745,9 +746,9 @@ exports.add_comment = function (sol_id, fields, serverCallback) { } else { users.updateOne( { user_name: fields[1] }, { $inc: { comments: 1} }, function (err) { - if (err) callback(false, "Error: Some error occured while updating user info"); + if (err) serverCallback(false, "Error: Some error occured while updating user info"); else { - callback(true, "Success: comment added successfully"); + serverCallback(true, "Success: comment added successfully"); } }); @@ -1332,14 +1333,12 @@ exports.sendMail = function (mail_data, callback) { }); } - /* * * callback(success, error, data, message) * Returns the user's inbox (array of message objects) * */ - exports.checkMailbox = function (username, callback) { mongoFactory.getConnection(uri).then(function(db) { |
