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.
25 lines
545 B
JavaScript
25 lines
545 B
JavaScript
'use strict';
|
|
|
|
var user = require('../../user'),
|
|
helpers = require('../helpers');
|
|
|
|
|
|
var notificationsController = {};
|
|
|
|
notificationsController.get = function(req, res, next) {
|
|
user.notifications.getAll(req.uid, 0, 39, function(err, notifications) {
|
|
if (err) {
|
|
return next(err);
|
|
}
|
|
res.render('notifications', {
|
|
notifications: notifications,
|
|
nextStart: 40,
|
|
title: '[[pages:notifications]]',
|
|
breadcrumbs: helpers.buildBreadcrumbs([{text: '[[pages:notifications]]'}])
|
|
});
|
|
});
|
|
};
|
|
|
|
|
|
module.exports = notificationsController;
|