packages feed

nested-routes 0.2.0.1 → 0.2.0.2

raw patch · 2 files changed

+8/−6 lines, 2 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

Files

nested-routes.cabal view
@@ -1,5 +1,5 @@ Name:                   nested-routes-Version:                0.2.0.1+Version:                0.2.0.2 Author:                 Athan Clark <athan.clark@gmail.com> Maintainer:             Athan Clark <athan.clark@gmail.com> License:                BSD3
src/Web/Routes/Nested.hs view
@@ -168,11 +168,13 @@       let cleanedPathInfo = applyToLast trimFileExt $ pathInfo req       case P.lookup cleanedPathInfo rtrie of         Just eitherM -> continue f v eitherM $ menf-        Nothing  -> case trimFileExt $ last $ pathInfo req of-          "index" -> case P.lookup (init $ pathInfo req) rtrie of-            Just eitherM -> continue f v eitherM $ menf-            Nothing -> liftIO $ respond404 $ menf-          _       -> liftIO $ respond404 $ menf+        Nothing  -> case pathInfo req of+          [] -> liftIO $ respond404 $ menf+          _  -> case trimFileExt $ last $ pathInfo req of+            "index" -> case P.lookup (init $ pathInfo req) rtrie of+              Just eitherM -> continue f v eitherM $ menf+              Nothing -> liftIO $ respond404 $ menf+            _       -> liftIO $ respond404 $ menf     _ -> liftIO $ respond404 $ notFoundBasic    where