Avoid repeating mime types
This commit is contained in:
@@ -124,8 +124,8 @@ userApiRequest schema req reqBody =
|
|||||||
Nothing -> PayloadParseError "All lines must have same number of fields"
|
Nothing -> PayloadParseError "All lines must have same number of fields"
|
||||||
Just json -> PayloadJSON json)
|
Just json -> PayloadJSON json)
|
||||||
(CSV.decodeByName reqBody)
|
(CSV.decodeByName reqBody)
|
||||||
Right OpenAPI ->
|
Right oa@OpenAPI ->
|
||||||
PayloadParseError "Content-type not acceptable: application/openapi+json; charset=utf-8"
|
PayloadParseError $ "Content-type not acceptable: " <> cs (show oa)
|
||||||
-- This is a Left value because form-urlencoded is not a content
|
-- This is a Left value because form-urlencoded is not a content
|
||||||
-- type which we ever use for responses, only something we handle
|
-- type which we ever use for responses, only something we handle
|
||||||
-- just this once for requests
|
-- just this once for requests
|
||||||
|
|||||||
Reference in New Issue
Block a user