mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-06 02:36:49 +00:00
17 lines
720 B
Go
17 lines
720 B
Go
package server
|
|
|
|
func (s Server) MountHandlers() {
|
|
// public
|
|
s.Router.GET("/", handleHomePage())
|
|
s.Router.POST("/request-booking", handleRequestBooking())
|
|
// admin
|
|
s.Router.GET("/bookings", handleListBookingPage(s.bs, s.hc))
|
|
s.Router.GET("/bookings/new", handleNewBookingPage())
|
|
s.Router.POST("/bookings/new", handleCreateBooking(s.bs))
|
|
s.Router.GET("/bookings/:id", handleBookingPage(s.bs, s.hc))
|
|
s.Router.POST("/bookings/:id/items", handleCreateItem(s.bs))
|
|
s.Router.GET("/bookings/pdf/:id", handleCreateInvoicePdf(s.bs, s.ps, s.hc))
|
|
s.Router.GET("/reports", handleReportsPage())
|
|
s.Router.GET("/reports/do", handleComputeReport(s.bs, s.hc))
|
|
s.Router.GET("/reports/pdf", handleCreateReportPdf(s.bs, s.ps))
|
|
}
|