idac: fix matching

This commit is contained in:
Hay1tsme 2024-01-09 12:52:53 -05:00
parent 4bc77a8ef6
commit 07cbbcc377
2 changed files with 5 additions and 4 deletions

View File

@ -76,7 +76,7 @@ class IDACServlet(BaseServlet):
def get_routes(self) -> List[Route]: def get_routes(self) -> List[Route]:
return [ return [
Route("/{version:int}/initiald/{category:str}/{endpoint:str}", self.render_POST, methods=["POST"]), 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( def get_allnet_info(

View File

@ -6,6 +6,7 @@ import json
import logging import logging
from core.config import CoreConfig from core.config import CoreConfig
from core.utils import Utils
from titles.idac.const import IDACConstants from titles.idac.const import IDACConstants
from titles.idac.config import IDACConfig from titles.idac.config import IDACConfig
from titles.idac.base import IDACBase from titles.idac.base import IDACBase
@ -108,10 +109,10 @@ class IDACSeason2(IDACBase):
version = headers["device_version"] version = headers["device_version"]
ver_str = version.replace(".", "")[:3] ver_str = version.replace(".", "")[:3]
if self.core_cfg.server.is_develop: if self.core_cfg.server.is_using_proxy:
domain_api_game = f"http://{self.core_cfg.server.hostname}:{self.core_cfg.server.port}/{ver_str}/"
else:
domain_api_game = f"http://{self.core_cfg.server.hostname}/{ver_str}/" 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 { return {
"status_code": "0", "status_code": "0",