all files / src/controllers/accounts/ notifications.js

50% Statements 4/8
0% Branches 0/2
0% Functions 0/2
50% Lines 4/8
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25                                         
'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;