From 83f233a7fe270dc77893c2df590b2e28ba30fc41 Mon Sep 17 00:00:00 2001 From: HumairAK Date: Sat, 27 Aug 2016 15:43:07 -0400 Subject: Added more inbox functionality for paging --- node_simple.js | 26 -------------------------- 1 file changed, 26 deletions(-) (limited to 'node_simple.js') diff --git a/node_simple.js b/node_simple.js index 7ff70c6..0b39620 100644 --- a/node_simple.js +++ b/node_simple.js @@ -1366,29 +1366,3 @@ exports.removeToken = function(token, callback) { }; - -/** - * Check if the user with the given username has mail. - * If the user does, then send the mail that falls within the specified page range. - * - * @param {object} username object - * @param {function} callback of the form (, , , ) - * - callback(error, success, mail, message) - * */ -exports.getMail = function (username, callback) { - - var mail = db.collection('mail'); - - mail.find({receiver: username}).toArray(function (err, data) { - if (err) { - callback(false, true, null, 'Error: could not retrieve inbox messages.'); - } else if (!data) { - callback(false, false, null, 'No inbox.'); - } else { - // Mail retrieved - callback(true, false, data, 'Retrieved inbox'); - } - - }); - -}; -- cgit v1.2.3