Ignore the Range header when the method is different than GET
fix: bug when using Range header on PATCH/DELETE - Fix the "message": "syntax error at or near \"RETURNING\"" error - Fix doing a limited update/delete when an order query parameter was present breaking: The Range header is now only considered on GET requests and is ignored for any other method - Other methods should use the `limit/offset` query parameters for sub-ranges - PUT requests no longer return an error when this header is present
This commit is contained in:
@@ -280,9 +280,9 @@ baseTable :: ByteString -> ByteString -> Value -> BaseTable
|
||||
baseTable = BaseTable
|
||||
|
||||
-- | The mutation (update/delete) that will be applied to the base table
|
||||
requestMutation :: Method -> ByteString -> BL.ByteString -> WaiExpectation ()
|
||||
requestMutation method path body =
|
||||
request method path [("Prefer", "tx=commit")] body `shouldRespondWith` 204
|
||||
requestMutation :: Method -> ByteString -> [Header] -> BL.ByteString -> WaiExpectation ()
|
||||
requestMutation method path headers body =
|
||||
request method path (("Prefer", "tx=commit") : headers) body `shouldRespondWith` 204
|
||||
|
||||
data BaseTable = BaseTable ByteString ByteString Value
|
||||
data MutationCheck = MutationCheck BaseTable (WaiExpectation ())
|
||||
|
||||
Reference in New Issue
Block a user