tenantService->fetchSettings($this->tenantIdentity->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": { * "default_mode": "dark", * "primary_color": "#6366F1", * "lock_user_colors": 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->tenantIdentity->identifier(), $data); $updatedSettings = $this->tenantService->fetchSettings($this->tenantIdentity->identifier(), array_keys($data)); return new JsonResponse($updatedSettings, JsonResponse::HTTP_OK); } }