mirror of
https://github.com/taobataoma/meanTorrent.git
synced 2026-01-26 00:59:19 +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
26 lines
680 B
JavaScript
26 lines
680 B
JavaScript
'use strict';
|
|
|
|
/**
|
|
* Module dependencies
|
|
*/
|
|
var adminPolicy = require('../policies/admin.server.policy'),
|
|
admin = require('../controllers/admin.server.controller');
|
|
|
|
module.exports = function (app) {
|
|
// User route registration first. Ref: #713
|
|
require('./users.server.routes.js')(app);
|
|
|
|
// Users collection routes
|
|
app.route('/api/users')
|
|
.get(adminPolicy.isAllowed, admin.list);
|
|
|
|
// Single user routes
|
|
app.route('/api/users/:userId')
|
|
.get(adminPolicy.isAllowed, admin.read)
|
|
.put(adminPolicy.isAllowed, admin.update)
|
|
.delete(adminPolicy.isAllowed, admin.delete);
|
|
|
|
// Finish by binding the user middleware
|
|
app.param('userId', admin.userByID);
|
|
};
|