mirror of
https://github.com/hanzo-fi/payments.git
synced 2026-10-30 20:31:20 +00:00
19 lines
457 B
Go
19 lines
457 B
Go
package services
|
|
|
|
import (
|
|
"context"
|
|
|
|
"github.com/formancehq/go-libs/v3/bun/bunpaginate"
|
|
"github.com/formancehq/payments/internal/models"
|
|
"github.com/formancehq/payments/internal/storage"
|
|
)
|
|
|
|
func (s *Service) PoolsList(ctx context.Context, query storage.ListPoolsQuery) (*bunpaginate.Cursor[models.Pool], error) {
|
|
ps, err := s.storage.PoolsList(ctx, query)
|
|
if err != nil {
|
|
return nil, newStorageError(err, "cannot list pools")
|
|
}
|
|
|
|
return ps, nil
|
|
}
|