1
0
forked from Hay1tsme/artemis

fixing handle_data for Crossbeats

This commit is contained in:
Midorica 2023-11-08 23:36:26 -05:00
parent 94c326a27d
commit 4b22bd734e

View File

@ -124,11 +124,15 @@ class CxbServlet(BaseServlet):
func_to_find = "handle_data_"
version_string = "Base"
internal_ver = 0
version = 0
if req_json == {}:
self.logger.warning(f"Empty json request to /data")
return b""
subcmd = list(req_json.keys())[0]
if subcmd == "dldate":
if (
not type(req_json["dldate"]) is dict
or "filetype" not in req_json["dldate"]
@ -153,6 +157,9 @@ class CxbServlet(BaseServlet):
func_to_find += f"{inflection.underscore(match.group(1))}xxxx"
else:
func_to_find += f"{inflection.underscore(filename)}"
else:
filetype = subcmd
func_to_find += filetype
func_to_find += "_request"