Create booking done
This commit is contained in:
@@ -100,24 +100,24 @@ func (h *ApplicationHandler) DriversJourney(w http.ResponseWriter, r *http.Reque
|
||||
return
|
||||
}
|
||||
|
||||
h.Renderer.SolidarityServiceListAvailableDrivers(w, r, drivers, accounts, &bookingData, cacheid)
|
||||
h.Renderer.SolidarityServiceListAvailableDrivers(w, r, drivers, &bookingData, accounts, cacheid)
|
||||
|
||||
} else {
|
||||
|
||||
h.Renderer.SolidarityService(w, r, accounts, cacheid)
|
||||
}
|
||||
if r.Method == "POST" {
|
||||
// if r.Method == "POST" {
|
||||
|
||||
booking, err := h.services.GRPC.SolidarityService.CreateBookingSolidarity(context.TODO(), &bookingData)
|
||||
// booking, err := h.services.GRPC.SolidarityService.CreateBookingSolidarity(context.TODO(), &bookingData)
|
||||
|
||||
if err != nil {
|
||||
fmt.Println(err)
|
||||
w.WriteHeader(http.StatusInternalServerError)
|
||||
return
|
||||
}
|
||||
// if err != nil {
|
||||
// fmt.Println(err)
|
||||
// w.WriteHeader(http.StatusInternalServerError)
|
||||
// return
|
||||
// }
|
||||
|
||||
h.Renderer.SolidarityServiceBooking(w, r, booking )
|
||||
// h.Renderer.SolidarityServiceBooking(w, r, booking )
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user