Small fixes to getting character images
All checks were successful
Build / build (push) Successful in 44s
Publish / publish (push) Successful in 51s

This commit is contained in:
2025-11-07 20:24:46 +01:00
parent 61cab73ffc
commit cff777f278
3 changed files with 9 additions and 9 deletions

View File

@@ -42,12 +42,12 @@ func (i *IndexHandler) HealthCheck(ctx echo.Context) error {
return ctx.JSON(http.StatusOK, db.Health())
}
func (i *IndexHandler) GetCharacters(ctx echo.Context) error {
characters := backend.GetCharacters()
func (i *IndexHandler) GetCharacterList(ctx echo.Context) error {
characters := backend.GetCharacterList()
return ctx.JSON(http.StatusOK, characters)
}
func (i *IndexHandler) GetCharacter(ctx echo.Context) error {
character := ctx.QueryParam("character")
character := ctx.QueryParam("name")
return ctx.File(backend.GetCharacter(character))
}

View File

@@ -64,7 +64,7 @@ func (s *Server) RegisterRoutes() http.Handler {
e.GET("/dbtest", index.GetDBTest)
e.GET("/health", index.HealthCheck)
e.GET("/character", index.GetCharacter)
e.GET("/characters", index.GetCharacters)
e.GET("/characters", index.GetCharacterList)
download := NewDownloadHandler()
e.GET("/download", download.checkLatest)