This commit is contained in:
nek0 2016-03-18 00:04:13 +01:00
parent fa65cee762
commit 01561b03b6

View file

@ -51,7 +51,7 @@ postBuyR uId bId = do
else do else do
let price = quant * (beveragePrice bev) let price = quant * (beveragePrice bev)
let sw = price > (userBalance user) let sw = price > (userBalance user)
today <- liftIO $ return utctDay =<< getCurrentTime today <- liftIO $ return . utctDay =<< getCurrentTime
runDB $ do runDB $ do
update uId [UserTimestamp =. today] update uId [UserTimestamp =. today]
update uId [UserBalance -=. price] update uId [UserBalance -=. price]