Explorar el Código

unrelated mailer fix

Vincent GUFFON hace 3 años
padre
commit
62452d805d

+ 2 - 2
src/Service/Elasticsearch/EducationNotationUpdater.php

@@ -10,7 +10,7 @@ use FOS\ElasticaBundle\Persister\ObjectPersister;
  */
 class EducationNotationUpdater
 {
-    public function __construct(private ObjectPersister $objectPersisterOrganization)
+    public function __construct(private ObjectPersister $objectPersisterEducationNotation)
     {
     }
 
@@ -19,6 +19,6 @@ class EducationNotationUpdater
      * @param $educationNotations
      */
     public function update(array $educationNotations){
-        $this->objectPersisterOrganization->replaceMany($educationNotations);
+        $this->objectPersisterEducationNotation->replaceMany($educationNotations);
     }
 }

+ 8 - 1
src/Service/Mobyt/MobytService.php

@@ -35,7 +35,14 @@ class MobytService extends ApiRequestService
      */
     protected function connect(string $login, string $password): void
     {
-        $responseContent = $this->getContent('login', ['username' => $login, 'password' => $password]);
+        $responseContent = $this->getContent('login',[],
+            [
+                'headers' => [
+                    'Content-Type: application/json',
+                    'Authorization: Basic '. base64_encode($login.':'.$password),
+                ]
+            ]
+        );
         [$this->userId, $this->sessionKey] = explode(';', $responseContent);
     }