diff --git a/handlers/application/solidarity_service.go b/handlers/application/solidarity_service.go index 7cd7179..39e624e 100644 --- a/handlers/application/solidarity_service.go +++ b/handlers/application/solidarity_service.go @@ -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 ) - } + // } } \ No newline at end of file diff --git a/main.go b/main.go index 2cc4597..2c8970d 100755 --- a/main.go +++ b/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) diff --git a/renderer/solidarity_service.go b/renderer/solidarity_service.go index 7173677..8c1102f 100644 --- a/renderer/solidarity_service.go +++ b/renderer/solidarity_service.go @@ -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 {