Return more data per player on listing all players

This commit is contained in:
2024-10-30 15:47:33 +01:00
parent 460503ba4a
commit 385b22d4e4
5 changed files with 63 additions and 6 deletions

View File

@@ -40,6 +40,9 @@ var as AssociationService
//go:embed selectPlayer.sql
var selectPlayer string
//go:embed selectPlayers.sql
var selectPlayers string
//go:embed selectAssociation.sql
var selectAssociation string
@@ -122,7 +125,7 @@ func GetPlayer(c fiber.Ctx) error {
}
func GetPlayers(c fiber.Ctx) error {
players, err := ps.Query(PlayerServiceQuery{})
players, err := ps.GetAllPlayers()
if err != nil {
Error.Printf("Failed getting players: %v", err)
return c.Status(500).JSON(Response{