mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-02-01 20:19:26 +01:00
Changed some bad comments referencing the Articles module in other modules.
Typo fixed in xxx.client.modules.js files ("Application" => "Applicaion")
Full stop character removed at the end of line comments
24 lines
635 B
JavaScript
24 lines
635 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Module dependencies
|
|
*/
|
|
var articlesPolicy = require('../policies/articles.server.policy'),
|
|
articles = require('../controllers/articles.server.controller');
|
|
|
|
module.exports = function (app) {
|
|
// Articles collection routes
|
|
app.route('/api/articles').all(articlesPolicy.isAllowed)
|
|
.get(articles.list)
|
|
.post(articles.create);
|
|
|
|
// Single article routes
|
|
app.route('/api/articles/:articleId').all(articlesPolicy.isAllowed)
|
|
.get(articles.read)
|
|
.put(articles.update)
|
|
.delete(articles.delete);
|
|
|
|
// Finish by binding the article middleware
|
|
app.param('articleId', articles.articleByID);
|
|
};
|