'use strict';

/**
 * Module dependencies.
 */
var products = require('../controllers/products.server.controller');
var mws = require('../controllers/mws.server.controller');


module.exports = function (app) {
  // products collection routes
  app.route('/api/products')
    .get(products.list)
    .post(products.create);

  // Single product routes
  app.route('/api/products/:productId')
    .get(products.read)
    .put(products.update)
    .delete(products.delete);

  app.route('/api/mws')
    .get(mws.orders)
    .post(products.create);

  // Finish by binding the product middleware
  app.param('productId', products.productByID);
};

@@ -314,24 +314,465 @@
 s.create);%0A%0A
+  // sku route%0A  app.route('/api/sku')%0A    .get(products.listBySku);%0A%0A  // brand route%0A  app.route('/api/brands')%0A    .get(products.listByBrand);%0A%0A  // brand by sku route%0A  app.route('/api/brand')%0A    .get(products.listByBrandAndSku);%0A%0A  // // makes api call for new timeframe%0A  // app.route('/api/mws')%0A  //   .get(products.orders);%0A%0A  // calculate total revenue%0A  // app.route('/api/revenue')%0A  //   .get(products.calculateTotalRevenue);%0A%0A
   // Single 
@@ -778,32 +778,32 @@
  product routes%0A
-
   app.route('/ap
@@ -911,80 +911,8 @@
 );%0A%0A
-  app.route('/api/mws')%0A    .get(mws.orders)%0A    .post(products.create);
 %0A%0A  

set up api routes calling server controlelr functions