fix linter error

This commit is contained in:
Ruidy 2024-08-23 10:11:39 +02:00
parent abf37d8413
commit 8417ac8ddc
No known key found for this signature in database
GPG key ID: E00F51288CB857CC

View file

@ -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))
}
}
}