Work on event launcher and related
This commit is contained in:
@@ -45,13 +45,13 @@ async def upload_files(
|
||||
account_id_random = account_id # This is for the account random str ID
|
||||
if account_id := redis_lookup_id_random(record_id_random=account_id, table_name='account'): pass
|
||||
else:
|
||||
return mk_resp(data=None, status_code=400)
|
||||
return mk_resp(data=None, status_code=400, response=response)
|
||||
|
||||
link_to_type = link_to_type
|
||||
link_to_id_random = link_to_id # This is for the object random str ID
|
||||
if link_to_id := redis_lookup_id_random(record_id_random=link_to_id, table_name=link_to_type): pass
|
||||
else:
|
||||
return mk_resp(data=None, status_code=400)
|
||||
return mk_resp(data=None, status_code=400, response=response)
|
||||
|
||||
hosted_file_list = []
|
||||
for file_obj in file_list:
|
||||
@@ -145,7 +145,7 @@ async def upload_files(
|
||||
log.debug('The hosted_file_link was probably created fine though.')
|
||||
|
||||
log.debug(hosted_file_list)
|
||||
return mk_resp(data=hosted_file_list)
|
||||
return mk_resp(data=hosted_file_list, response=response)
|
||||
# ### END ### API Hosted File Route ### upload_files() ###
|
||||
|
||||
|
||||
@@ -359,7 +359,7 @@ async def upload_files_fake(
|
||||
log.debug('The hosted_file_link was probably created fine though.')
|
||||
|
||||
log.debug(hosted_file_list)
|
||||
return mk_resp(data=hosted_file_list)
|
||||
return mk_resp(data=hosted_file_list, response=response)
|
||||
# ### END ### API Hosted File Route ### upload_files_fake() ###
|
||||
|
||||
|
||||
@@ -407,7 +407,7 @@ async def get_hosted_file_obj(
|
||||
|
||||
if hosted_file_id := redis_lookup_id_random(record_id_random=hosted_file_id, table_name='hosted_file'): pass
|
||||
else:
|
||||
return mk_resp(data=None, status_code=404)
|
||||
return mk_resp(data=None, status_code=404, response=response)
|
||||
|
||||
if hosted_file_obj := load_hosted_file_obj(
|
||||
hosted_file_id = hosted_file_id,
|
||||
@@ -418,6 +418,6 @@ async def get_hosted_file_obj(
|
||||
else:
|
||||
return mk_resp(data=False, status_code=400, response=response) # Bad Request
|
||||
|
||||
return mk_resp(data=hosted_file_dict)
|
||||
return mk_resp(data=hosted_file_dict, response=response)
|
||||
#return mk_resp(data=hosted_file_obj)
|
||||
# ### END ### API Hosted File ### get_hosted_file_obj() ###
|
||||
|
||||
Reference in New Issue
Block a user