Compare commits

..

2 Commits

1 changed files with 5 additions and 0 deletions

View File

@ -40,6 +40,11 @@ class SettingsController extends Controller {
return $this->makeJSONResponse(fn () => $this->appSettings->getGlobal());
}
#[NoCSRFRequired]
public function getGlobal(): JSONResponse {
return $this->makeJSONResponse(fn () => $this->appSettings->getGlobal());
}
protected function makeJSONResponse(Closure $closure): JSONResponse {
try {
return new JSONResponse($closure(), HTTP::STATUS_OK);