Add verify = false so guzzle can accessed to API
continuous-integration/drone/push Build is passing Details

unit_test
dorian.hodin 2 years ago
parent 5f65190572
commit 9354970ff7

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

@ -20,7 +20,7 @@ class ModelCandidate
private Client $client;
public function __construct(){
$this->client = new Client();
$this->client = new Client(['headers' => ['Content-Type' => 'application/json'], 'verify' => false]);
}
/**
@ -32,7 +32,6 @@ class ModelCandidate
public function submitForm(): void
{
$answersAndCategories = $_POST['answers'];
$dataIds = null;
if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_POST['action']) && $_POST['action'] === 'submitForm') {
$dataIdsJson = $_POST['data_ids'];

Loading…
Cancel
Save