This commit is contained in:
barisusakli
2014-07-28 15:52:33 -04:00
parent 4d73a563c5
commit d7520508e3
12 changed files with 335 additions and 252 deletions

View File

@@ -56,6 +56,38 @@ module.exports = function(app, middleware, controllers) {
});
router.get('/test', function(req, res) {
res.redirect('404');
//res.redirect('404');
var notifications = require('../notifications');
var nconf = require('nconf');
var username = 'julian';
var topicTitle = 'testing tags';
var topicSlug = '1748/testing-tags';
var postIndex = 1;
var tid = 1748;
var fromUid = 2;
notifications.create({
bodyShort: '[[notifications:user_posted_to, ' + username + ', ' + topicTitle + ']]',
bodyLong: 'asdasd khajsdhakhdakj hdkash dakhdakjdhakjs',
path: nconf.get('relative_path') + '/topic/' + topicSlug + '/' + postIndex,
uniqueId: 'topic:' + tid,
from: fromUid
}, function(err, nid) {
notifications.push(nid, [1]);
res.json('done');
});
});
router.get('/dailyunread', function(req, res) {
//var userNotifs = require('./user');
user.notifications.getDailyUnread(1, function(err, data) {
if (err) {
res.json(500, err.message);
}
res.json(data);
});
})
};