From 5d46f98cb433ee39cea0389f6c8cd523390b6858 Mon Sep 17 00:00:00 2001 From: Niklas Kapelle Date: Wed, 8 Jan 2025 01:59:57 +0100 Subject: [PATCH] implemented GetAllPlayers in inMemoryRepo --- internal/repo/inMemoryRepo.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/repo/inMemoryRepo.go b/internal/repo/inMemoryRepo.go index d108358..2cbeff7 100644 --- a/internal/repo/inMemoryRepo.go +++ b/internal/repo/inMemoryRepo.go @@ -79,6 +79,10 @@ func (r *InMemoryRepo) GetPlayer(id model.PlayerID) (*model.Player, error) { return nil, nil } +func (r *InMemoryRepo) GetAllPlayers() ([]model.Player,error){ + return r.players, nil +} + func (r *InMemoryRepo) AddGameResult(result model.GameResult) (model.GameResultID, error) { id := model.GameResultID(strconv.Itoa(len(r.results)))