refactor: move PUT checks to ApiRequest
This commit is contained in:
committed by
Steve Chavez
parent
e90391b7ac
commit
50b275d3e2
@@ -370,9 +370,6 @@ handleUpdate identifier context@(RequestContext _ _ ApiRequest{..} _) = do
|
||||
|
||||
handleSingleUpsert :: QualifiedIdentifier -> RequestContext-> DbHandler Wai.Response
|
||||
handleSingleUpsert identifier context@(RequestContext _ ctxDbStructure ApiRequest{..} _) = do
|
||||
when (iTopLevelRange /= RangeQuery.allRange) $
|
||||
throwError Error.PutRangeNotAllowedError
|
||||
|
||||
let pkCols = maybe mempty tablePKCols $ M.lookup identifier $ dbTables ctxDbStructure
|
||||
|
||||
WriteQueryResult{..} <- writeQuery MutationSingleUpsert identifier False pkCols context
|
||||
|
||||
Reference in New Issue
Block a user