mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-12-29 20:00:33 +01:00
24 lines
476 B
JavaScript
24 lines
476 B
JavaScript
"use strict";
|
|
|
|
var user = require('../user'),
|
|
|
|
SocketNotifs = {};
|
|
|
|
SocketNotifs.get = function(socket, data, callback) {
|
|
user.notifications.get(socket.uid, callback);
|
|
};
|
|
|
|
SocketNotifs.getCount = function(socket, data, callback) {
|
|
user.notifications.getUnreadCount(socket.uid, callback);
|
|
};
|
|
|
|
SocketNotifs.deleteAll = function(socket, data, callback) {
|
|
if (!socket.uid) {
|
|
return;
|
|
}
|
|
|
|
user.notifications.deleteAll(socket.uid, callback);
|
|
};
|
|
|
|
module.exports = SocketNotifs;
|