From 07cbbcc3776b1c42e3f53cc4d135b9b8a16f8163 Mon Sep 17 00:00:00 2001 From: Hay1tsme Date: Tue, 9 Jan 2024 12:52:53 -0500 Subject: [PATCH] idac: fix matching --- titles/idac/index.py | 2 +- titles/idac/season2.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/titles/idac/index.py b/titles/idac/index.py index c1e9d02..d6ac62a 100644 --- a/titles/idac/index.py +++ b/titles/idac/index.py @@ -76,7 +76,7 @@ class IDACServlet(BaseServlet): def get_routes(self) -> List[Route]: return [ Route("/{version:int}/initiald/{category:str}/{endpoint:str}", self.render_POST, methods=["POST"]), - Route("/{version:int}/initiald-matching/{endpoint:str}", self.render_POST, methods=["POST"]), + Route("/{version:int}/initiald-matching/{endpoint:str}", self.render_matching, methods=["POST"]), ] def get_allnet_info( diff --git a/titles/idac/season2.py b/titles/idac/season2.py index 2797990..6523177 100644 --- a/titles/idac/season2.py +++ b/titles/idac/season2.py @@ -6,6 +6,7 @@ import json import logging from core.config import CoreConfig +from core.utils import Utils from titles.idac.const import IDACConstants from titles.idac.config import IDACConfig from titles.idac.base import IDACBase @@ -108,10 +109,10 @@ class IDACSeason2(IDACBase): version = headers["device_version"] ver_str = version.replace(".", "")[:3] - if self.core_cfg.server.is_develop: - domain_api_game = f"http://{self.core_cfg.server.hostname}:{self.core_cfg.server.port}/{ver_str}/" - else: + if self.core_cfg.server.is_using_proxy: domain_api_game = f"http://{self.core_cfg.server.hostname}/{ver_str}/" + else: + domain_api_game = f"http://{self.core_cfg.server.hostname}:{Utils.get_title_port(self.core_cfg)}/{ver_str}/" return { "status_code": "0",