Refactor handlers and update changelog for 5.0.0-Beta
Build / build (push) Successful in 48s

- Split IndexHandler into HealthHandler, VersionHandler, and CharacterHandler
- Rename index.go to version.go in backend
- Change VersionData.Changelog from string to []string
- Add changelog entries for issues #16-#23
- Remove TestDB function and related code
- Fix import ordering in several files

Closes #21, #22
References #16, #17, #18, #19, #20, #23

Generated by Mistral Vibe.
Co-Authored-By: Mistral Vibe <vibe@mistral.ai>
This commit is contained in:
2026-06-08 20:08:06 +02:00
parent a446dad7b6
commit 8f8b555ea5
13 changed files with 318 additions and 255 deletions
+2 -2
View File
@@ -4,8 +4,8 @@ import (
"os"
"strings"
"music-server/internal/logging"
"go.uber.org/zap"
"music-server/internal/logging"
)
func GetCharacterList() []string {
@@ -30,10 +30,10 @@ func GetCharacterList() []string {
func GetCharacter(character string) string {
charactersPath := os.Getenv("CHARACTERS_PATH")
logging.GetLogger().Debug("Getting character", zap.String("character", character), zap.String("path", charactersPath))
// Clean the path - remove trailing slashes and then add one for consistency
charactersPath = strings.TrimSuffix(charactersPath, "/")
charactersPath += "/"
logging.GetLogger().Debug("Getting character", zap.String("character", character), zap.String("path", charactersPath+character))
return charactersPath + character
}