From f97c147ddd5886c04ef5d7fe87014ef9ea79c66d Mon Sep 17 00:00:00 2001 From: Scott Idem Date: Thu, 7 Mar 2024 11:03:57 -0500 Subject: [PATCH] Minor changes. Would like to add return_obj param, but not sure how yet. --- app/routers/api_crud.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/app/routers/api_crud.py b/app/routers/api_crud.py index 562973a..45bff9b 100644 --- a/app/routers/api_crud.py +++ b/app/routers/api_crud.py @@ -516,6 +516,8 @@ async def patch_obj( # for_obj_type: Optional[str] = Query(None, max_length=50), # for_obj_id: Optional[str] = Query(None, max_length=22), + # return_obj: Optional[bool] = True, # I am not sure how to make this work yet. -2024-03-07 + commons: Common_Route_Params = Depends(common_route_params), ): """ @@ -644,6 +646,15 @@ async def patch_obj( log.info('Something unexpected happened while trying to run the SQL UPDATE. The fields or field values passed may not be valid for the table and or model.') log.debug(sql_result) return mk_resp(data=False, status_code=400, status_message='Something unexpected happened while trying to runt he SQL UPDATE. The fields or field values passed may not be valid for the table and or model.', response=commons.response) + + + # ### SECTION ### Return successful results + # if return_obj: + # data_store_obj = load_data_store_obj( + # data_store_id = data_store_id, + # ) + # resp_data = data_store_obj + # return mk_resp(data=resp_data, response=commons.response) #, details=debug_data) # ### END ### API CRUD ### patch_obj() ###