|
|
@ -17,7 +17,7 @@ class ModelAdmin
|
|
|
|
private Client $client;
|
|
|
|
private Client $client;
|
|
|
|
|
|
|
|
|
|
|
|
public function __construct(){
|
|
|
|
public function __construct(){
|
|
|
|
$this->client = new Client();
|
|
|
|
$this->client = new Client(['headers' => ['Content-Type' => 'application/json'], 'verify' => false]);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function goToAdmin(): void
|
|
|
|
public function goToAdmin(): void
|
|
|
@ -42,8 +42,6 @@ class ModelAdmin
|
|
|
|
$questionContent = $_POST['question'];
|
|
|
|
$questionContent = $_POST['question'];
|
|
|
|
$type = $_POST['type'];
|
|
|
|
$type = $_POST['type'];
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$question = new $type(0, $questionContent);
|
|
|
|
$question = new $type(0, $questionContent);
|
|
|
|
$res = $this->client->request('GET', 'https://codefirst.iut.uca.fr/containers/Temoignages-deploy_api_form/getForm');
|
|
|
|
$res = $this->client->request('GET', 'https://codefirst.iut.uca.fr/containers/Temoignages-deploy_api_form/getForm');
|
|
|
|
if ($res->getStatusCode()!=200){
|
|
|
|
if ($res->getStatusCode()!=200){
|
|
|
|