mai2: fix function names
This commit is contained in:
@ -155,19 +155,14 @@ class Mai2Servlet(BaseServlet):
|
|||||||
f"Failed to make movie upload directory at {self.game_cfg.uploads.movies_dir}"
|
f"Failed to make movie upload directory at {self.game_cfg.uploads.movies_dir}"
|
||||||
)
|
)
|
||||||
|
|
||||||
def render_POST(self, request: Request, version: int, url_path: str) -> bytes:
|
def handle_mai2(self, request: Request, game_code: int, matchers: Dict) -> bytes:
|
||||||
if url_path.lower() == "ping":
|
endpoint = matchers['endpoint']
|
||||||
|
version = matchers['version']
|
||||||
|
if endpoint.lower() == "ping":
|
||||||
return zlib.compress(b'{"returnCode": "1"}')
|
return zlib.compress(b'{"returnCode": "1"}')
|
||||||
|
|
||||||
elif url_path.startswith("api/movie/"):
|
|
||||||
self.logger.info(f"Movie data: {url_path} - {request.content.getvalue()}")
|
|
||||||
return b""
|
|
||||||
|
|
||||||
req_raw = request.content.getvalue()
|
req_raw = request.content.getvalue()
|
||||||
url = request.uri.decode()
|
|
||||||
url_split = url_path.split("/")
|
|
||||||
internal_ver = 0
|
internal_ver = 0
|
||||||
endpoint = url_split[len(url_split) - 1]
|
|
||||||
client_ip = Utils.get_ip_addr(request)
|
client_ip = Utils.get_ip_addr(request)
|
||||||
|
|
||||||
if request.uri.startswith(b"/SDEZ"):
|
if request.uri.startswith(b"/SDEZ"):
|
||||||
|
Reference in New Issue
Block a user