#[Route(defaults: ['_routeScope' => ['api']])]
class UsageDataController extends AbstractController
{ public function __construct( private readonly ApprovalDetector
$approvalDetector,
) { } #[Route(path: '/api/usage-data/needs-approval', name: 'api.usage-data.request', methods: [Request::METHOD_GET])]
public function needsApprovalRequest(): JsonResponse
{ return new JsonResponse($this->approvalDetector->
needsApprovalRequest() && !
$this->approvalDetector->
isApprovalAlreadyRequested());
}}