18 lines
677 B
Go
18 lines
677 B
Go
package web
|
|
|
|
import (
|
|
"github.com/gorilla/mux"
|
|
)
|
|
|
|
func (ws *WebServer) setupVehiclesRoutes(appRouter *mux.Router) {
|
|
vehicles := appRouter.PathPrefix("/vehicles").Subrouter()
|
|
vehicles.HandleFunc("/", ws.appHandler.VehiclesSearchHTTPHandler())
|
|
|
|
// Bookings
|
|
vehicles.HandleFunc("/bookings/", ws.appHandler.VehiclesBookingsListHTTPHandler())
|
|
vehicles.HandleFunc("/bookings/{bookingid}", ws.appHandler.VehicleBookingDisplayHTTPHandler())
|
|
vehicles.HandleFunc("/bookings/{bookingid}/documents/{document}", ws.appHandler.BookingDocumentDownloadHTTPHandler())
|
|
|
|
// Vehicle booking
|
|
vehicles.HandleFunc("/v/{vehicleid}/b/{beneficiaryid}", ws.appHandler.BookVehicleHTTPHandler())
|
|
} |