chore: update ConnectorController

This commit is contained in:
Maël Gangloff
2024-07-30 18:44:19 +02:00
parent 4183f5223b
commit 1d7d734033

View File

@@ -9,7 +9,6 @@ use App\Entity\User;
use Doctrine\Common\Collections\Collection;
use Doctrine\ORM\EntityManagerInterface;
use Exception;
use Ovh\Api;
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\Attribute\Route;
@@ -59,14 +58,6 @@ class ConnectorController extends AbstractController
if ($connector->getProvider() === ConnectorProvider::OVH) {
$authData = OvhConnector::verifyAuthData($connector->getAuthData());
$connector->setAuthData($authData);
$ovh = new Api(
$authData['appKey'],
$authData['appSecret'],
$authData['apiEndpoint'],
$authData['consumerKey']
);
} else throw new Exception('Unknown provider');
$this->em->persist($connector);