General clean up. Work on abstracts and websockets
This commit is contained in:
@@ -372,6 +372,7 @@ async def delete_event_file_obj(
|
||||
return mk_resp(data=True, response=commons.response)
|
||||
# ### END ### API Event File ### delete_event_file_obj() ###
|
||||
|
||||
|
||||
# ### BEGIN ### API Event File ### delete_event_file_obj_v2() ###
|
||||
# Updated 2022-08-18
|
||||
@router.delete('/event/file/{event_file_id}/v2', response_model=Resp_Body_Base)
|
||||
@@ -387,7 +388,7 @@ async def delete_event_file_obj_v2(
|
||||
log.debug(locals())
|
||||
|
||||
if event_file_id := redis_lookup_id_random(record_id_random=event_file_id, table_name='event_file'): pass
|
||||
else: return mk_resp(data=None, status_code=404, response=commons.response)
|
||||
else: return mk_resp(data=None, status_code=404, response=commons.response, status_message=f'The Event File ID was invalid or not found. event_file_id={event_file_id}')
|
||||
|
||||
if event_file_obj := load_event_file_obj(
|
||||
event_file_id = event_file_id,
|
||||
@@ -415,7 +416,7 @@ async def delete_event_file_obj_v2(
|
||||
link_to_type = for_type
|
||||
link_to_id = for_id
|
||||
|
||||
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
log.debug(f'Event File ID: {event_file_id}')
|
||||
if handle_delete_event_file(event_file_id=event_file_id):
|
||||
if delete_hosted_file: pass
|
||||
@@ -459,4 +460,4 @@ async def delete_event_file_obj_v2(
|
||||
# else: return mk_resp(data=False, status_code=500, response=commons.response) # Internal Server Error
|
||||
|
||||
# return mk_resp(data=True, response=commons.response)
|
||||
# ### END ### API Event File ### delete_event_file_obj_v2() ###
|
||||
# ### END ### API Event File ### delete_event_file_obj_v2() ###
|
||||
|
||||
Reference in New Issue
Block a user