mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-11-06 22:15:48 +01:00
added API call for total unread topics; moved unread notification parsing to client side
also fixed a bug where the new notification icon glow would disappear on page refresh even if there were existing notifications.
This commit is contained in:
@@ -137,6 +137,13 @@ var user = require('./../user.js'),
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/api/unread/total', function(req, res) {
|
||||
var uid = (req.user) ? req.user.uid : 0;
|
||||
topics.getTotalUnread(uid, function(data) {
|
||||
res.json(data);
|
||||
});
|
||||
});
|
||||
|
||||
app.get('/api/confirm/:id', function(req, res) {
|
||||
user.email.confirm(req.params.id, function(data) {
|
||||
if (data.status === 'ok') {
|
||||
|
||||
Reference in New Issue
Block a user