From f09d9d0a1669fb0f22430e3a28e2b820e7428726 Mon Sep 17 00:00:00 2001 From: Nicolas Caron Date: Thu, 23 Feb 2023 12:33:20 +0100 Subject: [PATCH] sending mail to the prescripteur when beneficiary is delete --- handlers/application/agenda.go | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/handlers/application/agenda.go b/handlers/application/agenda.go index 4931159..506b0f3 100644 --- a/handlers/application/agenda.go +++ b/handlers/application/agenda.go @@ -541,8 +541,10 @@ func (h *ApplicationHandler) AgendaDeleteSubscribeEvent(w http.ResponseWriter, r } data := map[string]any{ - "key": r.FormValue("motif"), - "user": current_user_claims["email"], + "motif": r.FormValue("motif"), + "user": current_user_claims["first_name"].(string) + " " + current_user_claims["last_name"].(string), + "subscriber": fmt.Sprintf("http://localhost:9000/app/beneficiaries/%s", subscribeid), + "link": fmt.Sprintf("http://localhost:9000/app/agenda/%s", eventId), } // récupérer l'adresse mail de l'utilisateur qui a créé l'événement