Merge branch 'master' of github.com:nek0/yammat
This commit is contained in:
commit
6096731f8a
1 changed files with 3 additions and 2 deletions
|
@ -51,8 +51,9 @@ postBuyR uId bId = do
|
|||
else do
|
||||
let price = quant * (beveragePrice bev)
|
||||
let sw = price > (userBalance user)
|
||||
runDB $ update uId [UserBalance -=. price]
|
||||
runDB $ update bId [BeverageAmount -=. quant]
|
||||
runDB $ do
|
||||
update uId [UserBalance -=. price]
|
||||
update bId [BeverageAmount -=. quant]
|
||||
checkAlert bId
|
||||
master <- getYesod
|
||||
liftIO $ notifyUser user bev price master
|
||||
|
|
Loading…
Reference in a new issue