Vulcan/packages/telescope-rss/lib/server/routes.js

54 lines
1.2 KiB
JavaScript
Raw Normal View History

2014-06-27 19:57:30 +09:00
Meteor.startup(function () {
// New Post RSS
2014-06-27 19:57:30 +09:00
Router.route('/feed.xml', function () {
this.response.write(servePostRSS('new', 'feed.xml'));
2014-11-17 14:53:42 +09:00
this.response.end();
}, {
name: 'feed',
where: 'server'
});
2014-09-24 17:51:21 +08:00
// New Post RSS
2014-06-27 19:57:30 +09:00
Router.route('/rss/posts/new.xml', function () {
this.response.write(servePostRSS('top', 'rss/posts/new.xml'));
this.response.end();
}, {
name: 'rss_posts_new',
where: 'server'
});
// Top Post RSS
Router.route('/rss/posts/top.xml', function () {
this.response.write(servePostRSS('top', 'rss/posts/top.xml'));
this.response.end();
}, {
name: 'rss_posts_top',
where: 'server'
});
// Best Post RSS
Router.route('/rss/posts/best.xml', function () {
this.response.write(servePostRSS('best', 'rss/posts/best.xml'));
this.response.end();
}, {
name: 'rss_posts_best',
where: 'server'
});
2014-09-24 17:51:21 +08:00
// Comment RSS
Router.route('/rss/comments.xml', function() {
2014-11-17 14:53:42 +09:00
this.response.write(serveCommentRSS());
this.response.end();
}, {
name: 'rss_comments',
where: 'server'
});
2014-06-27 19:57:30 +09:00
2014-09-24 17:51:21 +08:00
});