Add REST ressource to get a person localisation.
[Project_proches_de_moi-server.git] / src / Entity / Person.php
index 701b9e63cc6a550591be4a919a690e2b3193eb2a..d401cc32432f16311220f818c8a775440b4729dc 100644 (file)
@@ -7,7 +7,7 @@ use Doctrine\ORM\Mapping as ORM;
 /**
  * @ORM\Entity()
  * @ORM\Table(name="Person", indexes={@ORM\Index(name="authentification_idx", columns={"email", "password"}),
- *                                    @ORM\Index(name="search_idx", columns={"firstname", "lastname"})});
+ *                                    @ORM\Index(name="search_idx", columns={"firstname", "lastname", "email"})});
  */
 class Person
 {
@@ -154,7 +154,7 @@ class Person
         $this->friends_with_me->add($friendship);
     }
 
-    public function addFriend(User $friend)
+    public function addFriend(Person $friend)
     {
         $fs = new Friendship();
         $fs->setPerson($this);