Added support for fetching character images from the server

This commit is contained in:
2025-01-14 10:01:48 +01:00
parent 5b640375c3
commit db8214cb02
4 changed files with 50 additions and 3 deletions

View File

@@ -26,3 +26,13 @@ func (i *IndexHandler) GetDBTest(ctx echo.Context) error {
backend.TestDB()
return ctx.JSON(http.StatusOK, "TestedDB")
}
func (i *IndexHandler) GetCharacters(ctx echo.Context) error {
characters := backend.GetCharacters()
return ctx.JSON(http.StatusOK, characters)
}
func (i *IndexHandler) GetCharacter(ctx echo.Context) error {
character := ctx.QueryParam("character")
return ctx.File(backend.GetCharacter(character))
}