From 10582cc1fcceae41beaf8bbd924ed51bd8a9c03b Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Fri, 29 Mar 2024 20:09:22 -0400 Subject: [PATCH 1/2] ongeki: fix frontend profiles not loading due to missing await --- titles/ongeki/frontend.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/titles/ongeki/frontend.py b/titles/ongeki/frontend.py index 36fb7d0..1cdec03 100644 --- a/titles/ongeki/frontend.py +++ b/titles/ongeki/frontend.py @@ -44,7 +44,7 @@ class OngekiFrontend(FE_Base): self.version = usr_sesh.ongeki_version if usr_sesh.user_id > 0: - profile_data =self.data.profile.get_profile_data(usr_sesh.user_id, self.version) + profile_data =await self.data.profile.get_profile_data(usr_sesh.user_id, self.version) rival_list = await self.data.profile.get_rivals(usr_sesh.user_id) rival_data = { "userRivalList": rival_list, From 7e709db0cc11eb9ba537ba6400f8c30aab1afc2b Mon Sep 17 00:00:00 2001 From: Kevin Trocolli Date: Fri, 29 Mar 2024 20:13:15 -0400 Subject: [PATCH 2/2] fix get_ip_addr --- core/utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/utils.py b/core/utils.py index 469a03f..a9d1705 100644 --- a/core/utils.py +++ b/core/utils.py @@ -34,7 +34,8 @@ class Utils: @classmethod def get_ip_addr(cls, req: Request) -> str: - return req.headers.get("x-forwarded-for", req.client.host) + ip = req.headers.get("x-forwarded-for", req.client.host) + return ip.split(", ")[0] @classmethod def get_title_port(cls, cfg: CoreConfig):