diff options
author | Ben Sima <ben@bsima.me> | 2023-08-14 20:48:10 -0400 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2023-08-16 14:29:43 -0400 |
commit | 2d8b280ed2c73d65fb905a580e9499bb7f69ff01 (patch) | |
tree | f9511f59603cd5128eaa3e47f6e90dd382afc9e8 /Network/Wai/Middleware | |
parent | 1fd4c0be9efe017ed9f6f1dd9b5d9ab70b1bcee2 (diff) |
Run lint
Idk why these missed the linter. Probably packages updated in the
nixpkgs version bump.
Diffstat (limited to 'Network/Wai/Middleware')
-rw-r--r-- | Network/Wai/Middleware/Braid.hs | 27 |
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 |