Nest response JSON more shallowly
This commit is contained in:
@@ -295,9 +295,6 @@ csvMT = "text/csv"
|
||||
jsonH :: Header
|
||||
jsonH = (hContentType, jsonMT)
|
||||
|
||||
textH :: Header
|
||||
textH = (hContentType, "text/plain")
|
||||
|
||||
contentTypeForAccept :: Maybe BS.ByteString -> Maybe BS.ByteString
|
||||
contentTypeForAccept accept
|
||||
| isNothing accept || hasJson = Just jsonMT
|
||||
|
||||
@@ -176,7 +176,7 @@ update t cols vals = B.Stmt
|
||||
callProc :: QualifiedIdentifier -> JSON.Object -> PStmt
|
||||
callProc qi params = do
|
||||
let args = T.intercalate "," $ map assignment (H.toList params)
|
||||
B.Stmt ("select " <> fromQi qi <> "(" <> args <> ")") empty True
|
||||
B.Stmt ("select * from " <> fromQi qi <> "(" <> args <> ")") empty True
|
||||
where
|
||||
assignment (n,v) = pgFmtIdent n <> ":=" <> insertableValue v
|
||||
|
||||
|
||||
Reference in New Issue
Block a user