aboutsummaryrefslogtreecommitdiff
path: root/node_simple.js
diff options
context:
space:
mode:
authorHumairAK <humair88@hotmail.com>2016-08-27 19:43:07 +0000
committerHumairAK <humair88@hotmail.com>2016-08-27 19:43:07 +0000
commit83f233a7fe270dc77893c2df590b2e28ba30fc41 (patch)
tree5916fa8fde478da08a481fcf9fb367f311e08eeb /node_simple.js
parent17a4b5f57e0223b211ab8ff601e587920e6e1bef (diff)
Added more inbox functionality for paging
Diffstat (limited to 'node_simple.js')
-rw-r--r--node_simple.js26
1 files changed, 0 insertions, 26 deletions
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 (<boolean1>, <boolean2>, <array of objects>, <string>)
- * - 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');
- }
-
- });
-
-};