13 lines
344 B
Haskell
13 lines
344 B
Haskell
|
{-# LANGUAGE NoImplicitPrelude #-}
|
||
|
{-# LANGUAGE OverloadedStrings #-}
|
||
|
module Handler.Avatars where
|
||
|
|
||
|
import Import
|
||
|
|
||
|
import Model.Cache ( getCached )
|
||
|
import Settings.StaticR ( staticR )
|
||
|
|
||
|
getAvatarR :: UserId -> Handler ()
|
||
|
getAvatarR = redirect <=< fmap (avatarR . entityVal) . getCached
|
||
|
where avatarR user = staticR ["img", userAvatar user]
|