add releases page; fix HUGE static file perf regression

This commit is contained in:
ari melody 2025-10-21 17:15:26 +01:00
parent 31fd5da44b
commit 065a34a744
Signed by: ari
GPG key ID: CF99829C92678188
20 changed files with 233 additions and 73 deletions

View file

@ -10,9 +10,9 @@ import (
"arimelody-web/model"
)
func serveArtist(app *model.AppState) http.Handler {
func serveArtists(app *model.AppState) http.Handler {
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
slices := strings.Split(r.URL.Path[1:], "/")
slices := strings.Split(strings.TrimPrefix(r.URL.Path, "/artists")[1:], "/")
id := slices[0]
artist, err := controller.GetArtist(app.DB, id)
if err != nil {