Add Preference-Applied header for POST upsert

- Ensure creating nothing on ignore-duplicates succeeds
- Refactor locationF query
This commit is contained in:
steve-chavez
2018-02-21 07:33:54 -05:00
committed by Steve Chávez
parent 6675821c64
commit 108f3cd651
5 changed files with 42 additions and 25 deletions
+2 -2
View File
@@ -116,8 +116,8 @@ userApiRequest schema req reqBody
, iPreferRepresentation = representation
, iPreferSingleObjectParameter = singleObject
, iPreferCount = hasPrefer "count=exact"
, iPreferResolution = if hasPrefer "resolution=merge-duplicates" then Just MergeDuplicates
else if hasPrefer "resolution=ignore-duplicates" then Just IgnoreDuplicates
, iPreferResolution = if hasPrefer (show MergeDuplicates) then Just MergeDuplicates
else if hasPrefer (show IgnoreDuplicates) then Just IgnoreDuplicates
else Nothing
, iFilters = filters
, iLogic = [(toS k, toS $ fromJust v) | (k,v) <- qParams, isJust v, endingIn ["and", "or"] k ]