big restructure

This commit is contained in:
2026-02-11 19:28:12 +01:00
parent cd59ccd99b
commit 3eb9cc0ac4
209 changed files with 5101 additions and 2459 deletions

View File

@@ -3,7 +3,7 @@
use MintyPHP\Http\Request;
use MintyPHP\Router;
use MintyPHP\Session;
use MintyPHP\Service\UserService;
use MintyPHP\Service\User\UserService;
use MintyPHP\Support\Guard;
Guard::requireLogin();
@@ -34,8 +34,9 @@ if ($userId <= 0) {
return;
}
$theme = trim((string) ($_POST['theme'] ?? ''));
if (!in_array($theme, ['light', 'dark'], true)) {
$theme = strtolower(trim((string) ($_POST['theme'] ?? '')));
$themes = appThemes();
if ($theme === '' || !isset($themes[$theme])) {
http_response_code(400);
if (Request::wantsJson()) {
Router::json(['ok' => false, 'error' => 'invalid_theme']);