From 56c1b45f4535fbead0693d9fe651563f22ab46ff Mon Sep 17 00:00:00 2001 From: soukainna Date: Wed, 1 Feb 2023 11:51:46 +0100 Subject: [PATCH] store eventid and subid --- handlers/application/agenda.go | 2 +- renderer/agenda.go | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/handlers/application/agenda.go b/handlers/application/agenda.go index 945f4c9..ba38f1e 100644 --- a/handlers/application/agenda.go +++ b/handlers/application/agenda.go @@ -338,7 +338,7 @@ func (h *ApplicationHandler) AgendaDeleteSubscribeEvent(w http.ResponseWriter, r subscribeid := vars["subscribeid"] fmt.Println(eventid) fmt.Println(subscribeid) - h.Renderer.AgendaDeleteSubscribeEvent(w, r) + h.Renderer.AgendaDeleteSubscribeEvent(w, r, eventid) } //////////////////////////////////////////////////////// diff --git a/renderer/agenda.go b/renderer/agenda.go index d16568c..1d13c64 100644 --- a/renderer/agenda.go +++ b/renderer/agenda.go @@ -40,15 +40,12 @@ func (renderer *Renderer) AgendaDisplayEvent(w http.ResponseWriter, r *http.Requ } //////////////////////////DElete subscriber////////////////////////////////// -func (renderer *Renderer) AgendaDeleteSubscribeEvent(w http.ResponseWriter, r *http.Request) { +func (renderer *Renderer) AgendaDeleteSubscribeEvent(w http.ResponseWriter, r *http.Request, eventid string) { files := renderer.ThemeConfig.GetStringSlice("views.agenda.delete_subscriber.files") state := NewState(r, renderer.ThemeConfig, agendaMenu) - // state.ViewState = map[string]any{ - // "event": event, - // "group": group, - // "subscribers": subscribers, - // "beneficiaries": beneficiaries, - // } + state.ViewState = map[string]any{ + "eventid": eventid, + } renderer.Render("agenda delete subscriber", w, r, files, state) }