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