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
raw <- runResourceT $ fileSource (avatarNewFile na) $$ sinkLbs
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
redirect $ HomeR
_ -> do

View File

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