 exports.delete = (req, res) ->
   shopId = req.session.currentShop.shopId
   dealId = req.params.dealId
-  
+
   Deal.findOne({_id: req.params.dealId}).exec (err, deal) ->
-   
+
     res.render 'pages/shopmanagement/deals/delete',
       {
         deal: deal,

            else
              console.log err
              res.redirect 'shopmanagement/deals/list'
      
   else
    fs.unlink file.path
    res.render "shopmanagement/deals/edit",

exports.create = (req, res) ->
  shopId = req.session.currentShop.shopId
  dealId = req.params.dealId

  DealCategory.find().sort('name').exec( (err, categories ) ->
    res.render 'pages/shopmanagement/deals/create',
      {
