instances added god may help

This commit is contained in:
2026-02-23 12:58:19 +01:00
parent 25370a1a55
commit 99db252f60
290 changed files with 9858 additions and 4914 deletions

View File

@@ -2,12 +2,13 @@
use MintyPHP\Http\Request;
use MintyPHP\Router;
use MintyPHP\Service\User\UserServicesFactory;
use MintyPHP\Session;
use MintyPHP\Service\User\UserService;
use MintyPHP\Support\Guard;
use MintyPHP\Support\Flash;
use MintyPHP\Support\Guard;
Guard::requireLogin();
$userAccountService = (new UserServicesFactory())->createUserAccountService();
if (($_SERVER['REQUEST_METHOD'] ?? 'GET') !== 'POST') {
Router::redirect('admin');
@@ -58,7 +59,7 @@ if ($theme === '' || !isset($themes[$theme])) {
return;
}
$updated = UserService::setTheme($userId, $theme);
$updated = $userAccountService->setTheme($userId, $theme);
if (!$updated) {
http_response_code(500);
if (Request::wantsJson()) {