notifications socket callbacks
parent
e95da77fe8
commit
111776d878
@ -1,17 +1,15 @@
|
||||
"use strict";
|
||||
|
||||
var user = require('../user'),
|
||||
|
||||
SocketNotifs = {};
|
||||
|
||||
SocketNotifs.get = function(socket, data, callback) {
|
||||
user.notifications.get(socket.uid, function(notifs) {
|
||||
callback(notifs);
|
||||
});
|
||||
user.notifications.get(socket.uid, callback);
|
||||
};
|
||||
|
||||
SocketNotifs.getCount = function(socket, data, callback) {
|
||||
user.notifications.getUnreadCount(socket.uid, function(err, count) {
|
||||
callback(err ? err.message : null, count);
|
||||
});
|
||||
user.notifications.getUnreadCount(socket.uid, callback);
|
||||
};
|
||||
|
||||
module.exports = SocketNotifs;
|
Loading…
Reference in New Issue