Migrate from purty to purs-tidy (#178)
* Replace purty with purs-tidy * run purs-tidy
This commit is contained in:
@@ -8,9 +8,7 @@ import Effect.Console as Console
|
||||
import HTTPure as HTTPure
|
||||
|
||||
-- | A type to hold the environment for our ReaderT
|
||||
type Env
|
||||
= { name :: String
|
||||
}
|
||||
type Env = { name :: String }
|
||||
|
||||
-- | A middleware that introduces a ReaderT
|
||||
readerMiddleware ::
|
||||
|
||||
@@ -37,7 +37,6 @@ pathMiddleware ::
|
||||
HTTPure.Request ->
|
||||
HTTPure.ResponseM
|
||||
pathMiddleware _ { path: [ "middleware" ] } = HTTPure.ok "Middleware!"
|
||||
|
||||
pathMiddleware router request = router request
|
||||
|
||||
-- | Say 'hello' when run, and add a default value to the X-Middleware header
|
||||
|
||||
@@ -7,9 +7,7 @@ import HTTPure as HTTPure
|
||||
-- | Specify the routes
|
||||
router :: HTTPure.Request -> HTTPure.ResponseM
|
||||
router { path: [ "hello" ] } = HTTPure.ok "hello"
|
||||
|
||||
router { path: [ "goodbye" ] } = HTTPure.ok "goodbye"
|
||||
|
||||
router _ = HTTPure.notFound
|
||||
|
||||
-- | Boot up the server
|
||||
|
||||
@@ -7,7 +7,6 @@ import HTTPure as HTTPure
|
||||
-- | Route to the correct handler
|
||||
router :: HTTPure.Request -> HTTPure.ResponseM
|
||||
router { body, method: HTTPure.Post } = HTTPure.ok body
|
||||
|
||||
router _ = HTTPure.notFound
|
||||
|
||||
-- | Boot up the server
|
||||
|
||||
Reference in New Issue
Block a user