feat: dashboard endpoint

This commit is contained in:
Guz
2025-03-06 16:56:31 -03:00
parent 742287e522
commit f9e9d95c80

View File

@@ -27,9 +27,9 @@ func New(assertions tinyssert.Assertions, log *slog.Logger, dev bool) http.Handl
r.Use(exception.PanicMiddleware())
r.Use(exception.Middleware())
r.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
r.HandleFunc("/dashboard", func(w http.ResponseWriter, r *http.Request) {
w.WriteHeader(http.StatusOK)
err := templates.Templates().ExecuteTemplate(w, "index.html", nil)
err := templates.Templates().ExecuteTemplate(w, "dashboard", nil)
if err != nil {
exception.InternalServerError(err).ServeHTTP(w, r)
}