From 43ebed6b396ac8bf14b20f2493c3ec5a65e55a48 Mon Sep 17 00:00:00 2001 From: Marvin Flock Date: Wed, 23 Apr 2025 20:31:09 +0200 Subject: [PATCH] fix: use correct dependency injection for json to work --- src/structure/components/com_sportsmanager/api.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/structure/components/com_sportsmanager/api.php b/src/structure/components/com_sportsmanager/api.php index 933f75c..469bef5 100644 --- a/src/structure/components/com_sportsmanager/api.php +++ b/src/structure/components/com_sportsmanager/api.php @@ -32,7 +32,7 @@ $secret = Factory::getContainer()->get(Registry::class)->get("secret"); function isJson(): bool { - $jInput = Factory::getContainer()->get(SiteApplication::class)->getInput(); + $jInput = Factory::getContainer()->get(SiteApplication::class)->input; return $jInput->get('format') === 'json'; } @@ -172,7 +172,7 @@ function begegnungVerlegenNotify($begegnung, $users, $vorschlagendes_team_id, $h abortWithError("Local Database only"); } $container = Factory::getContainer(); - $jInput = $container->get(SiteApplication::class)->getInput()->json; + $jInput = $container->get(SiteApplication::class)->input->json; $username = $jInput->getString('username'); $password = $jInput->getString('password'); @@ -200,7 +200,7 @@ function getUserID(): int { global $secret; $container = Factory::getContainer(); - $input = $container->get(Input::class); + $input = $container->get(SiteApplication::class)->input; $token = $input->server->getString('HTTP_SECRET', NULL); return $token != NULL && jwt_validate($token, $secret) && isset(_payload($token)->sub)