Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

The /admin/reload route is now bound by default.

  • Loading branch information...
commit 876e992681e301fce04d40919cef6f615745e268 1 parent f6e5f41
@mightybyte mightybyte authored
View
1  src/Snap/Snaplet/Heist.hs
@@ -16,6 +16,7 @@ module Snap.Snaplet.Heist
, heistInit
, addTemplates
, addTemplatesAt
+ , modifyHeistTS
, addSplices
-- * Handler Functions
View
3  src/Snap/Snaplet/Internal/Initializer.hs
@@ -429,10 +429,11 @@ runInitializer :: MVar (Snaplet b)
-> IO (Snaplet b, InitializerState b)
runInitializer mvar b@(Initializer i) = do
userConfig <- load [Optional "snaplet.cfg"]
+ let builtinHandlers = [("/admin/reload", reloadSite)]
let cfg = SnapletConfig [] "" Nothing "" userConfig [] (mkReloader mvar b)
logRef <- newIORef ""
((res, s), (Hook hook)) <- runWriterT $ LT.runLensT i id $
- InitializerState True (return ()) [] id cfg logRef
+ InitializerState True (return ()) builtinHandlers id cfg logRef
res' <- hook res
return (res', s)
View
1  test/suite/Blackbox/App.hs
@@ -90,7 +90,6 @@ app = makeSnaplet "app" "Test application" Nothing $ do
, ("/public", serveDirectory "public")
, ("/sessionDemo", sessionDemo)
, ("/sessionTest", sessionTest)
- , ("/admin/reload", reloadSite)
]
wrapHandlers (<|> heistServe)
return $ App hs (modL snapletValue fooMod fs) bs sm ns
View
1  test/suite/NestTest.hs
@@ -70,7 +70,6 @@ app = makeSnaplet "app" "nested snaplet application" Nothing $ do
fs <- embedSnaplet "foo" foo fooInit
addRoutes [ ("/hello", writeText "hello world")
, ("/public", serveDirectory "public")
- , ("/admin/reload", reloadSite)
]
return $ App fs
Please sign in to comment.
Something went wrong with that request. Please try again.