Create booking done
This commit is contained in:
parent
127a3c44bf
commit
13a34ad124
|
@ -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 )
|
||||
|
||||
}
|
||||
// }
|
||||
|
||||
}
|
2
main.go
2
main.go
|
@ -139,8 +139,6 @@ func main() {
|
|||
|
||||
//=================================silvermobi====================================
|
||||
application.HandleFunc("/solidarity_service/", applicationHandler.DriversJourney)
|
||||
//application.HandleFunc("/solidarity_service/", applicationHandler.CreatePendingBooking)
|
||||
|
||||
|
||||
appGroup := application.PathPrefix("/group_module").Subrouter()
|
||||
appGroup.HandleFunc("/", applicationHandler.Groups)
|
||||
|
|
|
@ -54,7 +54,7 @@ func (renderer *Renderer) SolidarityServiceBooking(w http.ResponseWriter, r *htt
|
|||
renderer.Render("solidarity_service", w, r, files, state)
|
||||
}
|
||||
|
||||
func (renderer *Renderer) SolidarityServiceListAvailableDrivers(w http.ResponseWriter, r *http.Request, drivers *solidarity_service.DriverJourneysResponse, accounts []mobilityaccountsstorage.Account, bookingData *solidarity_service.CreateBookingSolidarityRequest, cacheid string) {
|
||||
func (renderer *Renderer) SolidarityServiceListAvailableDrivers(w http.ResponseWriter, r *http.Request, drivers *solidarity_service.DriverJourneysResponse, booking *solidarity_service.CreateBookingSolidarityRequest, accounts []mobilityaccountsstorage.Account, cacheid string) {
|
||||
files := renderer.ThemeConfig.GetStringSlice("views.solidarity_service.list.files")
|
||||
state := NewState(r, renderer.ThemeConfig, solidarityserviceMenu)
|
||||
state.ViewState = SolidarityListState {
|
||||
|
|
Loading…
Reference in New Issue