list drivers first_name + last_name

This commit is contained in:
2024-09-17 10:30:29 +02:00
parent c03fcb31d6
commit 66c2c31090
2 changed files with 9 additions and 38 deletions

View File

@@ -59,8 +59,6 @@ func (h *ApplicationHandler) DriversJourney(w http.ResponseWriter, r *http.Reque
w.WriteHeader(http.StatusBadRequest)
return
}
fmt.Println(departuregeo, destinationgeo, "departuregeo")
}
request := &solidarity_service.DriverJourneysRequest{
@@ -96,37 +94,11 @@ func (h *ApplicationHandler) DriversJourney(w http.ResponseWriter, r *http.Reque
return
}
fmt.Println("request: ", request)
h.Renderer.SolidarityServiceBookingListDrivers(w, r, drivers, accounts, &booking, cacheid)
h.Renderer.SolidarityServiceListAvailableDrivers(w, r, drivers, accounts, &booking, cacheid)
} else {
DepartureAddress := "0 rue A";
PickupDate := r.FormValue("date");
layout := "2006-01-02T15:04"
dateParsed, err := time.Parse(layout, PickupDate)
timestamp := timestamppb.New(dateParsed)
request := &solidarity_service.DriverJourneysRequest{
DepartureDate: timestamp,
Departure: &solidarity_service.Feature{
Lat: 0,
Long: 0,
Address: DepartureAddress,
},
}
drivers, err := h.services.GRPC.SolidarityService.DriverJourneys(context.TODO(), request)
if err != nil {
fmt.Println(err)
w.WriteHeader(http.StatusInternalServerError)
return
}
h.Renderer.SolidarityService(w, r, drivers, accounts, cacheid)
h.Renderer.SolidarityService(w, r, accounts, cacheid)
}
}