Permalink
Browse files

Get initRest working with both interpreted and compiled heist

  • Loading branch information...
ozataman committed Mar 14, 2013
1 parent 1fe3d84 commit 8a2b74b4a70216b306c5720385af4ab4cd09cfb2
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/Snap/Restful.hs
View
@@ -151,12 +151,12 @@ initRest :: HasHeist b
-- ^ Additional resource level handlers
-> [(Text, Handler b v ())]
-- ^ Additional instance/item level handlers
+ -> Snaplet (Heist b)
-> Initializer b v ()
-initRest res rHandlers rResourceActions rItemActions = do
- let splices = resourceSplices res
- routes = resourceRoutes res rHandlers rResourceActions rItemActions
- addSplices splices
- addRoutes routes
+initRest res rHandlers rResourceActions rItemActions h = do
+ addRoutes $ resourceRoutes res rHandlers rResourceActions rItemActions
+ addConfig h mempty { hcInterpretedSplices = resourceSplices res
+ , hcCompiledSplices = resourceCSplices res }
------------------------------------------------------------------------------

0 comments on commit 8a2b74b

Please sign in to comment.