mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-07-13 22:13:23 +02:00
add comments server routes
This commit is contained in:
21
modules/torrents/server/routes/comments.server.routes.js
Normal file
21
modules/torrents/server/routes/comments.server.routes.js
Normal 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);
|
||||
};
|
||||
Reference in New Issue
Block a user