refactor: Carve out QueryParams module

This commit is contained in:
monacoremo
2022-01-07 09:32:33 +01:00
committed by Wolfgang Walther
parent 51ee072f84
commit bfbec8fa36
11 changed files with 662 additions and 486 deletions
+1 -1
View File
@@ -914,7 +914,7 @@ spec actualPgVersion = do
{ matchHeaders = [matchContentTypeJson] }
it "fails if an operator is not given" $
get "/ghostBusters?id=0" `shouldRespondWith` [json| {"details":"unexpected \"0\" expecting \"not\" or operator (eq, gt, ...)","message":"\"failed to parse filter (0)\" (line 1, column 1)"} |]
get "/ghostBusters?id=0" `shouldRespondWith` [json| {"details":"Failed to parse [(\"id\",\"0\")]","message":"Unexpected param or filter missing operator"} |]
{ matchStatus = 400
, matchHeaders = [matchContentTypeJson]
}
+2 -2
View File
@@ -8,10 +8,10 @@ import Protolude
main :: IO ()
main =
doctest
[ "--verbose"
, "-XOverloadedStrings"
[ "-XOverloadedStrings"
, "-XNoImplicitPrelude"
, "-XStandaloneDeriving"
, "-isrc"
, "src/PostgREST/Request/Preferences.hs"
, "src/PostgREST/Request/QueryParams.hs"
]