fixed recharge error

This commit is contained in:
nek0 2016-03-18 05:38:03 +01:00
parent e1d43876fe
commit d76b7995f0
1 changed files with 2 additions and 4 deletions

View File

@ -17,7 +17,6 @@ module Handler.Select where
import Import import Import
import Handler.Common import Handler.Common
import qualified Text.Read as R
import qualified Data.Text as T import qualified Data.Text as T
import Data.Maybe import Data.Maybe
@ -69,9 +68,8 @@ postRechargeR uId = do
redirect $ RechargeR uId redirect $ RechargeR uId
else do else do
updateCashier amount ("Guthaben: " `T.append` userIdent user) updateCashier amount ("Guthaben: " `T.append` userIdent user)
time <- liftIO getCurrentTime today <- liftIO $ return . utctDay =<< getCurrentTime
let secs = R.read $ formatTime defaultTimeLocale "%s" time runDB $ update uId [UserBalance +=. amount, UserTimestamp =. today]
runDB $ update uId [UserBalance +=. amount, UserTimestamp =. secs]
setMessageI MsgRecharged setMessageI MsgRecharged
redirect HomeR redirect HomeR
_ -> do _ -> do