diff --git a/API/src/api/Controller/RecherchesController.php b/API/src/api/Controller/RecherchesController.php index 215108452be1b535808cb9b785796ff18174307f..0d73b284f647a9ea173a3c3c7e243f334ea2f221 100644 --- a/API/src/api/Controller/RecherchesController.php +++ b/API/src/api/Controller/RecherchesController.php @@ -87,6 +87,8 @@ class RecherchesController { $temp = $this->OffresModel->findByTitre($input["produit"]); $annonces = []; if(!empty($temp)) { + $temp[0]["nom"] = $me["nom"]; + $temp[0]["prenom"] = $me["prenom"]; $annonces = array($me["url"] => $temp[0]); } $amis = $this->AmisModel->findAllWithout($input["parent"]); diff --git a/API/src/header.php b/API/src/header.php index 10f04a842fd5b09ccf2af15d2629a509d0b2f211..4aec241cc9bda3f8303f7905e05b5aad45608855 100644 --- a/API/src/header.php +++ b/API/src/header.php @@ -30,9 +30,6 @@ <div class="collapse navbar-collapse" id="navbarSupportedContent"> <!-- PAGES --> <ul class="navbar-nav mr-auto"> - <li class="nav-item active"> - <a class="nav-link" href="/accueil">Accueil<span class="sr-only">(current)</span></a> - </li> <li class="nav-item"> <a class="nav-link" href="/messages.php">Message</a> </li> diff --git a/API/src/recherches.php b/API/src/recherches.php index d742dcb6d4d97cdfd270625544d0da490d0e0f60..069048386d3632919dbbf463e3ed4e090f998d2d 100644 --- a/API/src/recherches.php +++ b/API/src/recherches.php @@ -50,6 +50,7 @@ $(document).ready(function() { data: JSON.stringify(demande), success: function(data){ if(data.length > 0) + console.log(data); afficherAnnonces(JSON.parse(data)); } @@ -89,7 +90,7 @@ $(document).ready(function() { bloc += '<div class="card-body d-flex flex-column">' bloc += '<p class="card-text pb-">' bloc += '<h3>' - bloc += key + ' : (' + ligneData["titre"] + ')' + bloc += key + ' : '+ligneData["prenom"] + ' ' + ligneData["nom"] +' (' + ligneData["titre"] + ')' bloc += '</h3>' bloc += ligneData["description"] bloc += '</p>'