From 982d07e8ad618daee292a7d281b75350d5fd6682 Mon Sep 17 00:00:00 2001 From: Maxime Date: Thu, 25 Apr 2024 15:16:06 +0200 Subject: [PATCH] change function's name in solidarity_mobility folders --- .../{silvermobi.go => solidarity_mobility.go} | 4 ++-- main.go | 2 +- renderer/{silvermobi.go => solidarity_mobility.go} | 10 +--------- 3 files changed, 4 insertions(+), 12 deletions(-) rename handlers/application/{silvermobi.go => solidarity_mobility.go} (78%) rename renderer/{silvermobi.go => solidarity_mobility.go} (52%) diff --git a/handlers/application/silvermobi.go b/handlers/application/solidarity_mobility.go similarity index 78% rename from handlers/application/silvermobi.go rename to handlers/application/solidarity_mobility.go index c8a61e1..82319a7 100644 --- a/handlers/application/silvermobi.go +++ b/handlers/application/solidarity_mobility.go @@ -6,11 +6,11 @@ import ( storage "git.coopgo.io/sbouaram/solidarity-service/storage" ) -func (h *ApplicationHandler) SilvermobiBookingList(w http.ResponseWriter, r *http.Request) { +func (h *ApplicationHandler) SolidarityMobilityDiverList(w http.ResponseWriter, r *http.Request) { storage.GetDriver() - h.Renderer.SilvermobiBookingList(w, r) + h.Renderer.SolidarityMobilityDiverList(w, r) } diff --git a/main.go b/main.go index 071139a..fa7a20f 100755 --- a/main.go +++ b/main.go @@ -139,7 +139,7 @@ func main() { //=================================silvermobi==================================== application.HandleFunc("/silvermobi/create", applicationHandler.SilvermobiBookingCreate) - application.HandleFunc("/solidarity_mobility/", applicationHandler.SilvermobiBookingList) + application.HandleFunc("/solidarity_mobility/", applicationHandler.SolidarityMobilityDiverList) application.HandleFunc("/silvermobi/update/{memberid}/{bookingid}", applicationHandler.SilvermobiBookingUpdate) application.HandleFunc("/silvermobi/delete/{memberid}/{bookingid}", applicationHandler.SilvermobiBookingDelete) diff --git a/renderer/silvermobi.go b/renderer/solidarity_mobility.go similarity index 52% rename from renderer/silvermobi.go rename to renderer/solidarity_mobility.go index 2521ae7..39d85d4 100644 --- a/renderer/silvermobi.go +++ b/renderer/solidarity_mobility.go @@ -7,17 +7,9 @@ import ( const solidaritymobilityMenu = "solidarity_mobility" -func (renderer *Renderer) SilvermobiBookingList( w http.ResponseWriter, r *http.Request) { +func (renderer *Renderer) SolidarityMobilityDiverList( w http.ResponseWriter, r *http.Request) { files:= renderer.ThemeConfig.GetStringSlice("views.solidarity_mobility.list.files") state := NewState(r, renderer.ThemeConfig, solidaritymobilityMenu) - state.ViewState = map[string]any{ - "beneficiaries": map[string]any{ - "count": "nbaccounts", - "latest": "accounts", - }, - "count_members": "count_members", - "events": "events", - } renderer.Render("solidarity_mobility", w, r, files, state)