text: var express = require('express');
  var dishRouter  = express.Router();
  
  var mongoose = require('mongoose');
  var Verify = require('./verify');
  
  var Dishes = require('../models/dishes');
  
  dishRouter.route('/')
  .get(Verify.verifyOrdinaryUser,function(req,res,next){
  
    Dishes.find({}, function(err, dish){
        if(err){
          throw err;
        }
        res.json(dish);
    });
  
  })
  
  .post(Verify.verifyOrdinaryUser, function (req, res, next) {
      Dishes.create(req.body, function (err, dish) {
          if (err) throw err;
          console.log('Dish created!');
          var id = dish._id;
  
          res.writeHead(200, {
              'Content-Type': 'text/plain'
          });
          res.end('Added the dish with id: ' + id);
      });
  })
  
  .delete(Verify.verifyOrdinaryUser, function (req, res, next) {
      Dishes.remove({}, function (err, resp) {
          if (err) throw err;
          res.json(resp);
      });
  });
  
  dishRouter.route('/:dishId')
  
  .get(function (req, res, next) {
      Dishes.findById(req.params.dishId, function (err, dish) {
          if (err) throw err;
          res.json(dish);
      });
  })
  
  .put(function (req, res, next) {
      Dishes.findByIdAndUpdate(req.params.dishId, {
          $set: req.body
      }, {
          new: true
      }, function (err, dish) {
          if (err) throw err;
          res.json(dish);
      });
  })
  
  .delete(function (req, res, next) {
      Dishes.findByIdAndRemove(req.params.dishId, function (err, resp) {        if (err) throw err;
          res.json(resp);
      });
  });
  
  module.exports = dishRouter;
  