Implementing list endpoints
This commit is contained in:
@ -34,6 +34,13 @@ func (s *charactersrvc) GetCharacter(ctx context.Context, p *character.GetCharac
|
||||
return
|
||||
}
|
||||
|
||||
func (s *charactersrvc) ListCharacters(ctx context.Context) (res []*character.Character, err error) {
|
||||
for _, value := range s.characters {
|
||||
res = append(res, value)
|
||||
}
|
||||
return
|
||||
}
|
||||
|
||||
// CreateCharacter implements createCharacter.
|
||||
func (s *charactersrvc) CreateCharacter(ctx context.Context, p *character.Character) (res *character.Character, err error) {
|
||||
s.logger.Print("character.createCharacter")
|
||||
|
Reference in New Issue
Block a user