Merge remote-tracking branch 'mdorman/yesod-core-fix'

This commit is contained in:
Joey Hess 2015-08-23 10:43:00 -07:00
commit 966934d143

View file

@ -36,8 +36,6 @@ publicFiles "static"
staticRoutes :: Static staticRoutes :: Static
staticRoutes = $(embed "static") staticRoutes = $(embed "static")
mkYesodData "WebApp" $(parseRoutesFile "Assistant/WebApp/routes")
data WebApp = WebApp data WebApp = WebApp
{ assistantData :: AssistantData { assistantData :: AssistantData
, authToken :: AuthToken , authToken :: AuthToken
@ -49,6 +47,8 @@ data WebApp = WebApp
, listenHost ::Maybe HostName , listenHost ::Maybe HostName
} }
mkYesodData "WebApp" $(parseRoutesFile "Assistant/WebApp/routes")
instance Yesod WebApp where instance Yesod WebApp where
{- Require an auth token be set when accessing any (non-static) route -} {- Require an auth token be set when accessing any (non-static) route -}
isAuthorized _ _ = checkAuthToken authToken isAuthorized _ _ = checkAuthToken authToken