toying with Avatar caching

This commit is contained in:
nek0 2015-07-28 21:48:09 +02:00
parent 6e93762eee
commit 43d587b2ad
2 changed files with 3 additions and 1 deletions

View File

@ -25,7 +25,8 @@ postNewAvatarR = do
FormSuccess na -> do FormSuccess na -> do
raw <- runResourceT $ fileSource (avatarNewFile na) $$ sinkLbs raw <- runResourceT $ fileSource (avatarNewFile na) $$ sinkLbs
thumb <- generateThumb $ B.concat $ L.toChunks raw thumb <- generateThumb $ B.concat $ L.toChunks raw
runDB $ insert_ $ Avatar (avatarNewIdent na) thumb now <- liftIO $ getCurrentTime
runDB $ insert_ $ Avatar (avatarNewIdent na) thumb now
setMessageI MsgAvatarUploadSuccessfull setMessageI MsgAvatarUploadSuccessfull
redirect $ HomeR redirect $ HomeR
_ -> do _ -> do

View File

@ -32,6 +32,7 @@ CashCheck
Avatar Avatar
ident Text ident Text
data ByteString data ByteString
altTime UTCTime default=now()
deriving Typeable Show deriving Typeable Show
Barcode Barcode
code Text code Text