diff --git a/Sources/src/app/controller/AthleteController.php b/Sources/src/app/controller/AthleteController.php index 1f8b0bf6..0abf76a2 100644 --- a/Sources/src/app/controller/AthleteController.php +++ b/Sources/src/app/controller/AthleteController.php @@ -93,7 +93,6 @@ class AthleteController extends BaseController $listSearch = $athleteGateway->getAthlete($username); $map = new AthleteMapper(); $athleteEntity = $map->athleteSqlToEntity($listSearch); - $listUsers = []; foreach ($athleteEntity as $entity) { $user = $map->athleteEntityToModel($entity); diff --git a/Sources/src/data/core/database/NotificationGateway.php b/Sources/src/data/core/database/NotificationGateway.php index 8ee36c5b..c1050ab9 100644 --- a/Sources/src/data/core/database/NotificationGateway.php +++ b/Sources/src/data/core/database/NotificationGateway.php @@ -20,8 +20,8 @@ class NotificationGateway } public function addNotification(NotificationEntity $notif){ - $query = "INSERT INTO Notification (idnotif, message, date, statut, urgence, athleteid) VALUES (:idNotif, :message, :date, :statut, :urgence, :idAthlete)"; - $params = [':idNotif'=>$notif->getIdNotif(), ':message'=>$notif->getMessage(), ':date'=>$notif->getDate(), ':statut'=>$notif->getStatut(), ':urgence'=>$notif->getUrgence(), ':idAthlete'=>$notif->getIdAthlete()]; + $query = "INSERT INTO Notification (message, date, statut, urgence, athleteid) VALUES (:message, :date, :statut, :urgence, :idAthlete)"; + $params = [':message'=>$notif->getMessage(), ':date'=>$notif->getDate(), ':statut'=>$notif->getStatut(), ':urgence'=>$notif->getUrgence(), ':idAthlete'=>$notif->getIdAthlete()]; return $this->connection->executeWithErrorHandling($query, $params); } } \ No newline at end of file