|
|
@ -20,8 +20,8 @@ class NotificationGateway
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public function addNotification(NotificationEntity $notif){
|
|
|
|
public function addNotification(NotificationEntity $notif){
|
|
|
|
$query = "INSERT INTO Notification (idnotif, message, date, statut, urgence, athleteid) VALUES (:idNotif, :message, :date, :statut, :urgence, :idAthlete)";
|
|
|
|
$query = "INSERT INTO Notification (message, date, statut, urgence, athleteid) VALUES (:message, :date, :statut, :urgence, :idAthlete)";
|
|
|
|
$params = [':idNotif'=>$notif->getIdNotif(), ':message'=>$notif->getMessage(), ':date'=>$notif->getDate(), ':statut'=>$notif->getStatut(), ':urgence'=>$notif->getUrgence(), ':idAthlete'=>$notif->getIdAthlete()];
|
|
|
|
$params = [':message'=>$notif->getMessage(), ':date'=>$notif->getDate(), ':statut'=>$notif->getStatut(), ':urgence'=>$notif->getUrgence(), ':idAthlete'=>$notif->getIdAthlete()];
|
|
|
|
return $this->connection->executeWithErrorHandling($query, $params);
|
|
|
|
return $this->connection->executeWithErrorHandling($query, $params);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|