You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
17 lines
418 B
JavaScript
17 lines
418 B
JavaScript
var user = require('../user'),
|
|
|
|
SocketNotifs = {};
|
|
|
|
SocketNotifs.get = function(data, callback, sessionData) {
|
|
user.notifications.get(sessionData.uid, function(notifs) {
|
|
callback(notifs);
|
|
});
|
|
};
|
|
|
|
SocketNotifs.getCount = function(callback, sessionData) {
|
|
user.notifications.getUnreadCount(sessionData.uid, function(err, count) {
|
|
callback(err ? err.message : null, count);
|
|
});
|
|
};
|
|
|
|
module.exports = SocketNotifs; |