diff --git a/internal/server/handle_bookings.go b/internal/server/handle_bookings.go index a4dd5a3..65dd907 100644 --- a/internal/server/handle_bookings.go +++ b/internal/server/handle_bookings.go @@ -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)) } } }