tenantService->fetchSettings($this->tenantContext->identifier()); return new JsonResponse($settings, JsonResponse::HTTP_OK); } /** * Update one or more settings for the current tenant. * * @param array $data Key-value pairs to persist * * @example request body: * { * "data": { * "theme_default_mode": "dark", * "theme_palette": {"light": {"colors": {"primary": "#0284C7"}}}, * "theme_lock": true * } * } * * @return JsonResponse The updated values that were written */ #[AuthenticatedRoute( '/tenant/settings', name: 'tenant.settings.update', methods: ['PUT', 'PATCH'], permissions: ['tenant.settings.update'], )] public function update(array $data): JsonResponse { $this->tenantService->storeSettings($this->tenantContext->identifier(), $data); $updatedSettings = $this->tenantService->fetchSettings($this->tenantContext->identifier(), array_keys($data)); return new JsonResponse($updatedSettings, JsonResponse::HTTP_OK); } }