mirror of
https://github.com/rjNemo/rentease.git
synced 2026-06-06 02:36:49 +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 {
|
||||
search := c.FormValue("search")
|
||||
|
||||
bookings := make([]*booking.Line, 0)
|
||||
var bookings []*booking.Line
|
||||
if search != "" {
|
||||
bookings = bs.Search(search)
|
||||
} else {
|
||||
|
|
@ -46,11 +46,9 @@ func handleBookingListPage(bs *booking.Service, hc *config.Host) echo.HandlerFun
|
|||
})
|
||||
|
||||
if search != "" {
|
||||
component := view.BookingLines(bvm)
|
||||
return renderTempl(c, http.StatusOK, component)
|
||||
return renderTempl(c, http.StatusOK, view.BookingLines(bvm))
|
||||
} else {
|
||||
component := view.ListBookings(bvm)
|
||||
return renderTempl(c, http.StatusOK, component)
|
||||
return renderTempl(c, http.StatusOK, view.ListBookings(bvm))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue