{"size": 623, "ext": "js", "max_stars_repo_path": "modules/pod/server/routes/pods.server.routes.js", "max_stars_repo_name": "Matty2012/MeanJS-Pod", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "modules/pod/server/routes/pods.server.routes.js", "max_issues_repo_name": "Matty2012/MeanJS-Pod", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "modules/pod/server/routes/pods.server.routes.js", "max_forks_repo_name": "Matty2012/MeanJS-Pod", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 23.9615384615, "max_line_length": 65, "alphanum_fraction": 0.6789727127}
'use strict';

/**
 * Module Dependencies
 */
var podsPolicy = require('../policies/pods.server.policy');
var pods = require('../controllers/pods.server.controller');

module.exports = function (app) {
  // Pod collection routes
  app.route('/api/pods').all(podsPolicy.isAllowed)
    .get(pods.list)
    .post(pods.create);

  // Single pod routes
  app.route('/api/pods/:podId').all(podsPolicy.isAllowed)
    .get(pods.read)
    .put(pods.update)
    .delete(pods.delete);

  app.route('/api/pods/picture').post(pods.changeProfilePicture);

  // Finish by binding the pod middleware
  app.param('podId', pods.podByID);
};
