2014-09-06 06:56:36 +00:00
|
|
|
module Handler.Admin where
|
|
|
|
|
|
|
|
import Import
|
2014-12-27 23:30:53 +00:00
|
|
|
import Helper
|
2014-09-06 06:56:36 +00:00
|
|
|
|
|
|
|
getAdminR :: Handler Html
|
|
|
|
getAdminR = do
|
2014-12-27 22:09:51 +00:00
|
|
|
adminCheck <- loginIsAdmin
|
|
|
|
case adminCheck of
|
|
|
|
Right _ -> do
|
|
|
|
defaultLayout $ do
|
|
|
|
setTitle "Administration: Menu"
|
|
|
|
$(widgetFile "adminBase")
|
|
|
|
Left (errorMsg, route) -> do
|
|
|
|
setMessage errorMsg
|
|
|
|
redirect $ route
|