Files

19 lines
486 B
Go

package services
import (
"context"
"github.com/hanzo-fi/go-libs/v5/pkg/storage/bun/paginate"
"github.com/hanzo-fi/payments/pkg/domain/models"
"github.com/hanzo-fi/payments/internal/storage"
)
func (s *Service) AccountsList(ctx context.Context, query storage.ListAccountsQuery) (*paginate.Cursor[models.Account], error) {
accounts, err := s.storage.AccountsList(ctx, query)
if err != nil {
return nil, newStorageError(err, "cannot list accounts")
}
return accounts, nil
}