mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-12 13:46:51 +00:00
fix linter error
This commit is contained in:
parent
abf37d8413
commit
8417ac8ddc
1 changed files with 3 additions and 5 deletions
|
|
@ -25,7 +25,7 @@ func handleBookingListPage(bs *booking.Service, hc *config.Host) echo.HandlerFun
|
||||||
return func(c echo.Context) error {
|
return func(c echo.Context) error {
|
||||||
search := c.FormValue("search")
|
search := c.FormValue("search")
|
||||||
|
|
||||||
bookings := make([]*booking.Line, 0)
|
var bookings []*booking.Line
|
||||||
if search != "" {
|
if search != "" {
|
||||||
bookings = bs.Search(search)
|
bookings = bs.Search(search)
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -46,11 +46,9 @@ func handleBookingListPage(bs *booking.Service, hc *config.Host) echo.HandlerFun
|
||||||
})
|
})
|
||||||
|
|
||||||
if search != "" {
|
if search != "" {
|
||||||
component := view.BookingLines(bvm)
|
return renderTempl(c, http.StatusOK, view.BookingLines(bvm))
|
||||||
return renderTempl(c, http.StatusOK, component)
|
|
||||||
} else {
|
} else {
|
||||||
component := view.ListBookings(bvm)
|
return renderTempl(c, http.StatusOK, view.ListBookings(bvm))
|
||||||
return renderTempl(c, http.StatusOK, component)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue