From fc3cc6aee7ce7a28539d332902c0f9923d298c71 Mon Sep 17 00:00:00 2001 From: HumairAK Date: Sun, 24 Jul 2016 23:16:38 -0400 Subject: added all admin panel functionality --- node_simple.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'node_simple.js') diff --git a/node_simple.js b/node_simple.js index 3c3abd7..b86542b 100644 --- a/node_simple.js +++ b/node_simple.js @@ -730,9 +730,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"); } }); @@ -1316,14 +1316,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) { -- cgit v1.2.3 From 74fe077b29ee681f8e55d14afdbd7c93bc2c1048 Mon Sep 17 00:00:00 2001 From: kumar Date: Sun, 24 Jul 2016 23:52:56 -0400 Subject: updated comments and moved underscoer module from dev to regualr dependensices --- node_simple.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'node_simple.js') diff --git a/node_simple.js b/node_simple.js index 3741e1e..447c605 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 -- cgit v1.2.3