 
   if format[1] is "jpg" or format[1] is "jpeg" or format[1] is "png" or format[1] is "gif"
     fs.rename req.files.image.path, path, (err) ->
-      
+
 
       Deal.findOne({_id: req.body.id}).exec (err, deal) ->
 

  format = type.split("/")
  if format[1] is "jpg" or format[1] is "jpeg" or format[1] is "png" or format[1] is "gif"
    fs.rename req.files.image.path, path, (err) ->
  
      Shop.findOne({_id: shopId}).exec (err, shop) ->

        if shop

        }
      )
  )

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