Added GET API call for portal-settings.

This commit is contained in:
2026-06-14 23:12:51 +02:00
parent b088314c38
commit b93f4d2e9c
2 changed files with 20 additions and 1 deletions

View File

@@ -7,7 +7,16 @@ require_once $_SERVER['DOCUMENT_ROOT'] . '/api/classes/API_portalsettings.php';
$API_portalsettings = new API_portalsettings();
if ($API_portalsettings->request_method === 'PUT') {
if ($API_portalsettings->request_method === 'GET') {
$API_portalsettings->checkPermissions('admin-portalsettings', 'RO');
$portalSettings = $API_portalsettings->getPortalSettings();
if ($portalSettings !== null) {
unset($portalSettings[0]["mail_smtp_pass"]);
}
$API_portalsettings->apiOutput($code = 200, ['success' => $portalSettings]);
} elseif ($API_portalsettings->request_method === 'PUT') {
# Edit the portal settings of the platform