mai2: fix function names

This commit is contained in:
2023-10-20 00:57:19 -04:00
parent a6f2f05b6a
commit 179146d676

View File

@ -155,19 +155,14 @@ class Mai2Servlet(BaseServlet):
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:
if url_path.lower() == "ping":
def handle_mai2(self, request: Request, game_code: int, matchers: Dict) -> bytes:
endpoint = matchers['endpoint']
version = matchers['version']
if endpoint.lower() == "ping":
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()
url = request.uri.decode()
url_split = url_path.split("/")
internal_ver = 0
endpoint = url_split[len(url_split) - 1]
client_ip = Utils.get_ip_addr(request)
if request.uri.startswith(b"/SDEZ"):