'use strict';

/**
 * Module dependencies.
 */
var featureMappersPolicy = require('../policies/featureMappers.server.policy'),
  featureMappers = require('../controllers/featureMappers.server.controller');

module.exports = function (app) {
  // FeatureMappers collection routes
  app.route('/api/featureMappers').all(featureMappersPolicy.isAllowed)
    .get(featureMappers.list)
    .post(featureMappers.create);

  // Single featureMapper routes
  app.route('/api/featureMappers/:featureMapperId').all(featureMappersPolicy.isAllowed)
    .get(featureMappers.read)
    .put(featureMappers.update)
    .delete(featureMappers.delete);

  // Finish by binding the featureMapper middleware
  app.param('featureMapperId', featureMappers.featureMapperByID);
};
