Create booking done

This commit is contained in:
2024-09-18 15:56:13 +02:00
parent 127a3c44bf
commit 13a34ad124
3 changed files with 11 additions and 13 deletions

View File

@@ -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 )
}
// }
}