Introduce new 'Prefer' header, params=single-object (#739)

This commit is contained in:
dsimunic
2016-11-20 14:14:39 -08:00
committed by Joe Nelson
parent 4df853eff9
commit ae40641963
8 changed files with 46 additions and 8 deletions
+2 -1
View File
@@ -215,7 +215,8 @@ app dbStructure conf apiRequest =
Right (q, cq) -> respondToRange $ do
let p = V.head payload
singular = iPreferSingular apiRequest
row <- H.query () (callProc qi p q cq topLevelRange shouldCount singular)
paramsAsSingleObject = iPreferSingleObjectParameter apiRequest
row <- H.query () (callProc qi p q cq topLevelRange shouldCount singular paramsAsSingleObject)
let (tableTotal, queryTotal, body) =
fromMaybe (Just 0, 0, emptyArray) row
(status, contentRange) = rangeHeader queryTotal tableTotal