fixed recharge error
This commit is contained in:
parent
e1d43876fe
commit
d76b7995f0
1 changed files with 2 additions and 4 deletions
|
@ -17,7 +17,6 @@ module Handler.Select where
|
|||
|
||||
import Import
|
||||
import Handler.Common
|
||||
import qualified Text.Read as R
|
||||
import qualified Data.Text as T
|
||||
import Data.Maybe
|
||||
|
||||
|
@ -69,9 +68,8 @@ postRechargeR uId = do
|
|||
redirect $ RechargeR uId
|
||||
else do
|
||||
updateCashier amount ("Guthaben: " `T.append` userIdent user)
|
||||
time <- liftIO getCurrentTime
|
||||
let secs = R.read $ formatTime defaultTimeLocale "%s" time
|
||||
runDB $ update uId [UserBalance +=. amount, UserTimestamp =. secs]
|
||||
today <- liftIO $ return . utctDay =<< getCurrentTime
|
||||
runDB $ update uId [UserBalance +=. amount, UserTimestamp =. today]
|
||||
setMessageI MsgRecharged
|
||||
redirect HomeR
|
||||
_ -> do
|
||||
|
|
Loading…
Reference in a new issue