Fix typing error on ApiController.php