summaryrefslogtreecommitdiff
path: root/Network/Wai
diff options
context:
space:
mode:
authorBen Sima <ben@bsima.me>2023-08-14 20:48:10 -0400
committerBen Sima <ben@bsima.me>2023-08-16 14:29:43 -0400
commit2d8b280ed2c73d65fb905a580e9499bb7f69ff01 (patch)
treef9511f59603cd5128eaa3e47f6e90dd382afc9e8 /Network/Wai
parent1fd4c0be9efe017ed9f6f1dd9b5d9ab70b1bcee2 (diff)
Run lint
Idk why these missed the linter. Probably packages updated in the nixpkgs version bump.
Diffstat (limited to 'Network/Wai')
-rw-r--r--Network/Wai/Middleware/Braid.hs27
1 files changed, 14 insertions, 13 deletions
diff --git a/Network/Wai/Middleware/Braid.hs b/Network/Wai/Middleware/Braid.hs
index f9832ac..5dbc7f4 100644
--- a/Network/Wai/Middleware/Braid.hs
+++ b/Network/Wai/Middleware/Braid.hs
@@ -65,19 +65,20 @@ import Network.Wai.Middleware.AddHeaders (addHeaders)
type Topic = [Text]
-data Update = -- | Updates are streamed from the server to subcribing client.
- -- On a PUT request, the headers and request body are put into an Update and streamed to subscribing clients.
- Update
- { -- | The updateTopic is formed, from the request path
- updateTopic :: [Text],
- -- | The updateClient is an id generated by the client to prevent echo updates
- -- https://github.com/braid-work/braid-spec/issues/72
- updateClient :: Maybe B.ByteString,
- -- | The updateHeader are taken straight from the request headers
- updateHeaders :: RequestHeaders,
- -- | The updatePatches correspond to the request body
- updatePatches :: L.ByteString
- }
+data Update
+ = -- | Updates are streamed from the server to subcribing client.
+ -- On a PUT request, the headers and request body are put into an Update and streamed to subscribing clients.
+ Update
+ { -- | The updateTopic is formed, from the request path
+ updateTopic :: [Text],
+ -- | The updateClient is an id generated by the client to prevent echo updates
+ -- https://github.com/braid-work/braid-spec/issues/72
+ updateClient :: Maybe B.ByteString,
+ -- | The updateHeader are taken straight from the request headers
+ updateHeaders :: RequestHeaders,
+ -- | The updatePatches correspond to the request body
+ updatePatches :: L.ByteString
+ }
isGetRequest, isPutRequest, isPatchRequest :: Wai.Request -> Bool
isGetRequest req = Wai.requestMethod req == methodGet