timestamp gets updated at buying
This commit is contained in:
parent
6720907137
commit
4995783b9d
1 changed files with 2 additions and 0 deletions
|
@ -51,7 +51,9 @@ postBuyR uId bId = do
|
|||
else do
|
||||
let price = quant * (beveragePrice bev)
|
||||
let sw = price > (userBalance user)
|
||||
today <- liftIO $ return utctDay =<< getCurrentTime
|
||||
runDB $ do
|
||||
update uId [UserTimestamp =. today]
|
||||
update uId [UserBalance -=. price]
|
||||
update bId [BeverageAmount -=. quant]
|
||||
checkAlert bId
|
||||
|
|
Loading…
Reference in a new issue