From 232764e7d70980e6ea0aa13307fceae706957245 Mon Sep 17 00:00:00 2001 From: soukainna Date: Mon, 6 Mar 2023 10:27:12 +0100 Subject: [PATCH] delete log --- handlers/application/administration.go | 36 +------------------------- 1 file changed, 1 insertion(+), 35 deletions(-) diff --git a/handlers/application/administration.go b/handlers/application/administration.go index 55d40ca..5d75e21 100644 --- a/handlers/application/administration.go +++ b/handlers/application/administration.go @@ -99,7 +99,7 @@ func (h *ApplicationHandler) Administration(w http.ResponseWriter, r *http.Reque groupps[g.Id] = g.ToStorageType() } } - ///////////////////////////////////////////////////////////////////////////////////////// + h.Renderer.Administration(w, r, accounts, beneficiaries, groups, bookings, responses) } @@ -387,16 +387,6 @@ func filteVehicle(r *http.Request, v *fleets.Vehicle) bool { func (h ApplicationHandler) AdminStatVehicles(w http.ResponseWriter, r *http.Request) { - // request := &fleets.GetVehiclesRequest{ - // Namespaces: []string{"parcoursmob"}, - // } - // resp, err := h.services.GRPC.Fleets.GetVehicles(context.TODO(), request) - // if err != nil { - // fmt.Println(err) - // w.WriteHeader(http.StatusInternalServerError) - // } - - //vehicles := []fleetsstorage.Vehicle{} bookings := []fleetsstorage.Booking{} administrators := []string{} reequest := &fleets.GetVehiclesRequest{ @@ -486,29 +476,6 @@ func (h *ApplicationHandler) groupmembers(groupid string) (groupmembers []mobili return groupmembers, admins, err } -////////////////////////available //////////////////////////////////// -// func (h ApplicationHandler) AdminStatAvailableVehicles(w http.ResponseWriter, r *http.Request) { -// request := &fleets.GetVehiclesRequest{ -// Namespaces: []string{"parcoursmob"}, -// } -// resp, err := h.services.GRPC.Fleets.GetVehicles(context.TODO(), request) -// if err != nil { -// fmt.Println(err) -// w.WriteHeader(http.StatusInternalServerError) -// } - -// vehicles := []fleetsstorage.Vehicle{} -// for i, vehiicle := range resp.Vehicles { -// if len(resp.Vehicles[i].Bookings) == 0 { -// v := vehiicle.ToStorageType() -// vehicles = append(vehicles, v) -// } -// } -// fmt.Println(vehicles) -// fmt.Println("////////////////////////////////////////:") -// h.Renderer.UnbookingVehicles(w, r, vehicles) -// } - //////////////////////////////beneificiare list/////////// func (h ApplicationHandler) AdminStatBeneficaires(w http.ResponseWriter, r *http.Request) { beneficiaries, err := h.services.GetBeneficiaries() @@ -519,7 +486,6 @@ func (h ApplicationHandler) AdminStatBeneficaires(w http.ResponseWriter, r *http } cacheid := uuid.NewString() h.cache.PutWithTTL(cacheid, beneficiaries, 1*time.Hour) - fmt.Println(beneficiaries) h.Renderer.AdminStatBeneficaires(w, r, beneficiaries, cacheid) }