From 3abe2c3fbe95ab0a38045c359b808fadac6220ea Mon Sep 17 00:00:00 2001 From: Samuel Johnson Date: Sun, 4 May 2025 00:25:10 -0400 Subject: Create music player GUI --- cmd/web/handlers/blog.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'cmd/web/handlers/blog.go') diff --git a/cmd/web/handlers/blog.go b/cmd/web/handlers/blog.go index da3aec2..d995583 100644 --- a/cmd/web/handlers/blog.go +++ b/cmd/web/handlers/blog.go @@ -12,15 +12,16 @@ type blogContext struct { Name string } -func (ctx blogContext) index(w http.ResponseWriter, r *http.Request) { +func (ctx *blogContext) index(w http.ResponseWriter, r *http.Request) { if r.URL.Path != "/" { http.NotFound(w, r) return } files := []string{ - "./ui/html/base.tmpl.html", - "./ui/html/pages/index.tmpl.html", + "ui/html/base.tmpl.html", + "ui/html/music_player.tmpl.html", + "ui/html/pages/index.tmpl.html", } compiled, err := template.ParseFiles(files...) @@ -34,5 +35,6 @@ func (ctx blogContext) index(w http.ResponseWriter, r *http.Request) { if err != nil { ctx.err.Print(err.Error()) http.Error(w, "Internal Server Error", 500) + return } } -- cgit v1.2.3