$value) { if (substr($constant, 0, 6) === 'GROCY_') { $returnArray[substr($constant, 6)] = $value; } } return $this->ApiResponse($response, $returnArray); } catch (\Exception $ex) { return $this->GenericErrorResponse($response, $ex->getMessage()); } } public function GetDbChangedTime(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) { return $this->ApiResponse($response, [ 'changed_time' => $this->getDatabaseService()->GetDbChangedTime() ]); } public function GetSystemInfo(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) { return $this->ApiResponse($response, $this->getApplicationService()->GetSystemInfo()); } public function LogMissingLocalization(\Psr\Http\Message\ServerRequestInterface $request, \Psr\Http\Message\ResponseInterface $response, array $args) { if (GROCY_MODE === 'dev') { try { $requestBody = $this->GetParsedAndFilteredRequestBody($request); $this->getLocalizationService()->CheckAndAddMissingTranslationToPot($requestBody['text']); return $this->EmptyApiResponse($response); } catch (\Exception $ex) { return $this->GenericErrorResponse($response, $ex->getMessage()); } } } public function __construct(\DI\Container $container) { parent::__construct($container); } }