> */ #[NoAdminRequired] public function updateConfig(string $key, int|string $value): DataResponse { if (!in_array($key, self::ACCEPTED_KEYS, true)) { return new DataResponse(['message' => 'Invalid config key'], Http::STATUS_BAD_REQUEST); } /** @psalm-suppress PossiblyNullArgument */ $this->config->setUserValue($this->userId, Application::APP_NAME, $key, (string)$value); return new DataResponse([ $key => $value ]); } }