Files

19 lines
472 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) OrdersList(ctx context.Context, query storage.ListOrdersQuery) (*paginate.Cursor[models.Order], error) {
cursor, err := s.storage.OrdersList(ctx, query)
if err != nil {
return nil, newStorageError(err, "cannot list orders")
}
return cursor, nil
}