ongeki: fixes
This commit is contained in:
parent
701952ed9a
commit
af236d3ce0
|
@ -120,21 +120,27 @@ class OngekiServlet(BaseServlet):
|
|||
|
||||
return True
|
||||
|
||||
def get_endpoint_matchers(self) -> Tuple[List[Tuple[str, str, Dict]], List[Tuple[str, str, Dict]]]:
|
||||
return (
|
||||
[],
|
||||
[("render_POST", "/SDDT/{version}/{endpoint}", {})]
|
||||
)
|
||||
|
||||
def get_allnet_info(self, game_code: str, game_ver: int, keychip: str) -> Tuple[str, str]:
|
||||
if not self.core_cfg.server.is_using_proxy and Utils.get_title_port(self.core_cfg) != 80:
|
||||
return (
|
||||
f"http://{self.core_cfg.title.hostname}:{Utils.get_title_port(self.core_cfg)}/{game_code}/$v/",
|
||||
f"http://{self.core_cfg.title.hostname}:{Utils.get_title_port(self.core_cfg)}/{game_code}/{game_ver}/",
|
||||
f"{self.core_cfg.title.hostname}:{Utils.get_title_port(self.core_cfg)}/",
|
||||
)
|
||||
|
||||
return (
|
||||
f"http://{self.core_cfg.title.hostname}/{game_code}/$v/",
|
||||
f"http://{self.core_cfg.title.hostname}/{game_code}/{game_ver}/",
|
||||
f"{self.core_cfg.title.hostname}/",
|
||||
)
|
||||
|
||||
def render_POST(self, request: Request, game_code: str, matchers: Dict) -> bytes:
|
||||
endpoint = matchers['endpoint']
|
||||
version = matchers['version']
|
||||
version = int(matchers['version'])
|
||||
if endpoint.lower() == "ping":
|
||||
return zlib.compress(b'{"returnCode": 1}')
|
||||
|
||||
|
|
Loading…
Reference in New Issue