package routes

import (
	"net/http"

	"gitea.henriburau.de/haw-lan/cod4watcher/views/home"
)

func (s *Server) HandleHome(w http.ResponseWriter, r *http.Request) error {
	captureList, err := s.cs.GetActiveCapures()
	if err != nil {
		return err
	}

	return Render(w, r, home.Index(captureList))
}
