music: remove for now
crispy-caesus crispy@crispy-caesus.eu
Sun, 18 Jan 2026 15:17:19 +0100
2 files changed,
5 insertions(+),
28 deletions(-)
M
cmd/server/main.go
→
cmd/server/main.go
@@ -1,20 +1,12 @@
package main import ( - "crispy-website/internal/db" - "crispy-website/internal/repo" "fmt" "log" "net/http" - "text/template" ) func main() { - repository, err := repo.NewRepository("walletdrain.db") - if err != nil { - panic("failed to open db") - } - fs := http.FileServer(http.Dir("static")) http.Handle("/static/", http.StripPrefix("/static/", fs))@@ -22,18 +14,9 @@
http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { http.ServeFile(w, r, "templates/index.html") }) - + http.HandleFunc("/music", func(w http.ResponseWriter, r *http.Request) { - results := repository.LoadMusic() - spending := repository.GetSpending() - tmpl := template.Must(template.ParseFiles("templates/music.html")) - - data := db.MusicData{Releases: results, Spending: spending} - - err := tmpl.Execute(w, data) - if err != nil { - http.Error(w, err.Error(), http.StatusInternalServerError) - } + http.ServeFile(w, r, "templates/music.html") }) http.HandleFunc("/.well-known/discord", func(w http.ResponseWriter, r *http.Request) {
M
templates/music.html
→
templates/music.html
@@ -13,15 +13,9 @@ <h1>My bought music</h1>
<a title="Bandcamp" href="https://bandcamp.com/crispy-caesus" target="_blank" rel="noopener noreferrer"> My Bandcamp </a> - <p>Spending so far: {{.Spending}}€</p> - <ul> - {{range .Releases}} - <li> - <img src="{{.Note}}" alt="Album Cover" width="50" /> - <p>{{.Name}} - {{.Artist}}</p> - </li> - {{end}} - </ul> + <p>For the timebeing this page won't exist anymore as I probably lost the DB in a migration</p> + <br> + <p>I hope I can bring it back at some point</p> </body> </html>