Finally returning correct HTTP status codes

This commit is contained in:
Scott Idem
2021-08-10 19:06:40 -04:00
parent a1b9d3c518
commit cfd85435f2
29 changed files with 83 additions and 82 deletions

View File

@@ -95,7 +95,7 @@ async def post_event_person_new(
person_obj_new = Person_Base(**person_new)
log.debug(person_obj_new)
return mk_resp(data=False, status_code=401) # TESTING TESTING TESTING
return mk_resp(data=False, status_code=401, response=response) # TESTING TESTING TESTING
create_person_obj_result = create_person_obj(person_obj_new=person_obj_new)
if isinstance(create_person_obj_result, int):
@@ -249,7 +249,7 @@ async def patch_event_person_json(
else:
return mk_resp(data=event_person_obj_up_result)
else:
return mk_resp(data=False, status_code=400) # Bad Request
return mk_resp(data=False, status_code=400, response=response) # Bad Request
# ### END ### API Event Person ### patch_event_person_json() ###
@@ -310,7 +310,7 @@ async def get_event_person_obj(
# event_dict = event_person_obj.dict(by_alias=by_alias, exclude_unset=exclude_unset)
pass
else:
return mk_resp(data=False, status_code=400) # Bad Request
return mk_resp(data=False, status_code=400, response=response) # Bad Request
return mk_resp(data=event_person_obj)
# ### END ### API Event ### get_event_person_obj() ###