getAllDrivers

This commit is contained in:
2024-11-29 11:43:47 +01:00
parent 163ffefbfb
commit f43d02c762
2 changed files with 12 additions and 10 deletions

View File

@@ -133,6 +133,8 @@ func (h *ApplicationHandler) DriversJourney(w http.ResponseWriter, r *http.Reque
func (h *ApplicationHandler) SolidarityService (w http.ResponseWriter, r *http.Request) {
accounts, err := h.services.GRPC.SolidarityService.GetAllPassengers(context.TODO(), &emptypb.Empty{})
drivers, err := h.services.GRPC.SolidarityService.GetAllDrivers(context.TODO(), &emptypb.Empty{})
parcourmobAccounts, err := h.beneficiaries(r)
if err != nil {
fmt.Println(err)
@@ -140,7 +142,6 @@ func (h *ApplicationHandler) SolidarityService (w http.ResponseWriter, r *http.R
}
cacheid := uuid.NewString()
h.cache.PutWithTTL(cacheid, accounts, 1*time.Hour)
h.Renderer.BeneficiariesSolidarity(w, r, accounts, parcourmobAccounts, cacheid)
h.Renderer.BeneficiariesSolidarity(w, r, accounts, drivers, parcourmobAccounts, cacheid)
}