From 2d8b280ed2c73d65fb905a580e9499bb7f69ff01 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Mon, 14 Aug 2023 20:48:10 -0400 Subject: Run lint Idk why these missed the linter. Probably packages updated in the nixpkgs version bump. --- Network/Wai/Middleware/Braid.hs | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) (limited to 'Network/Wai/Middleware/Braid.hs') 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 -- cgit v1.2.3