From 179146d67675449239bb14b248a76dd33f45b159 Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Fri, 20 Oct 2023 00:57:19 -0400 Subject: [PATCH] mai2: fix function names --- titles/mai2/index.py | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/titles/mai2/index.py b/titles/mai2/index.py index 9c73fc2..0b7d524 100644 --- a/titles/mai2/index.py +++ b/titles/mai2/index.py @@ -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"):