Files
breadcrumb-the-shire/pages/api/v1/settings/public().php
2026-03-06 00:44:52 +01:00

22 lines
624 B
PHP

<?php
use MintyPHP\Http\ApiBootstrap;
use MintyPHP\Http\ApiResponse;
use MintyPHP\Service\Settings\SettingsAppGateway;
ApiBootstrap::init(requireAuth: false);
ApiResponse::requireMethod('GET');
$settingsAppGateway = app(SettingsAppGateway::class);
header('Cache-Control: public, max-age=60');
ApiResponse::success([
'data' => [
'app_title' => $settingsAppGateway->getAppTitle(),
'app_primary_color' => $settingsAppGateway->getAppPrimaryColor(),
'default_theme' => $settingsAppGateway->getAppTheme(),
'registration_enabled' => $settingsAppGateway->isRegistrationEnabled(),
],
]);