list drivers first_name + last_name
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user