eidolon/Handler/Admin.hs
2014-12-27 23:09:51 +01:00

16 lines
356 B
Haskell

module Handler.Admin where
import Import
import Handler.Commons
getAdminR :: Handler Html
getAdminR = do
adminCheck <- loginIsAdmin
case adminCheck of
Right _ -> do
defaultLayout $ do
setTitle "Administration: Menu"
$(widgetFile "adminBase")
Left (errorMsg, route) -> do
setMessage errorMsg
redirect $ route