|
|
|
@ -2,14 +2,14 @@ var user = require('../user'),
|
|
|
|
|
|
|
|
|
|
SocketNotifs = {};
|
|
|
|
|
|
|
|
|
|
SocketNotifs.get = function(data, callback, sessionData) {
|
|
|
|
|
user.notifications.get(sessionData.uid, function(notifs) {
|
|
|
|
|
SocketNotifs.get = function(socket, data, callback) {
|
|
|
|
|
user.notifications.get(socket.uid, function(notifs) {
|
|
|
|
|
callback(notifs);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
SocketNotifs.getCount = function(callback, sessionData) {
|
|
|
|
|
user.notifications.getUnreadCount(sessionData.uid, function(err, count) {
|
|
|
|
|
SocketNotifs.getCount = function(socket, callback) {
|
|
|
|
|
user.notifications.getUnreadCount(socket.uid, function(err, count) {
|
|
|
|
|
callback(err ? err.message : null, count);
|
|
|
|
|
});
|
|
|
|
|
};
|
|
|
|
|