accessChecker->ensureCanAccessMail($this->getUser()); $body = json_decode($request->getContent(), true) ?? []; $folderPath = $body['folderPath'] ?? null; $this->bus->dispatch(new MailSyncRequested($folderPath)); return $this->json( ['message' => 'Synchronisation démarrée en arrière-plan'], Response::HTTP_ACCEPTED ); } }