add comments server routes

This commit is contained in:
OldHawk
2017-04-21 18:28:49 +08:00
parent 4a4379a8b1
commit 12c76f4ee0

View File

@@ -0,0 +1,21 @@
'use strict';
/**
* Module dependencies
*/
var comments = require('../controllers/comments.server.controller');
module.exports = function (app) {
app.route('/api/comments/:torrentId')
.get(comments.list)
.post(comments.create);
app.route('/api/comments/:torrentId/:commentId')
.get(comments.SubList)
.post(comments.SubCreate)
.put(comments.update)
.delete(comments.delete);
app.route('/api/comments/:torrentId/:commentId/:subCommentId')
.put(comments.SubUpdate)
.delete(comments.SubDelete);
};