aboutsummaryrefslogtreecommitdiff
path: root/node_simple.js
diff options
context:
space:
mode:
authornanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-07-25 05:41:58 +0000
committernanalelfe <nargiza.nosirova@mail.utoronto.ca>2016-07-25 05:41:58 +0000
commit6d8857b2a3774db605f10631e327f152f241834b (patch)
treeb0d6f7e0e09ba0b257f99218da885556cde45b8c /node_simple.js
parent5ae1a4bc73f34d3a8f83607b79fe20d4594238e6 (diff)
parent74fe077b29ee681f8e55d14afdbd7c93bc2c1048 (diff)
Merge branch 'master' of https://github.com/HumairAK/solutions_repo
Diffstat (limited to 'node_simple.js')
-rw-r--r--node_simple.js9
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) {