3bdc27f4de
Continue finishing the parts of the text extraction plan * add missing fields
21 lines
372 B
Go
21 lines
372 B
Go
package client
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
// List returns all clients ordered by name.
|
|
func (s *Service) List(ctx context.Context) ([]*Client, error) {
|
|
clients, err := s.cfg.GetDBQueries().ListClients(ctx)
|
|
if err != nil {
|
|
return nil, err
|
|
}
|
|
|
|
result := make([]*Client, len(clients))
|
|
for i, c := range clients {
|
|
result[i] = parseFullClient(c)
|
|
}
|
|
|
|
return result, nil
|
|
}
|