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