Merge pull request 'verification before payment and email fixes' (#526) from SEND054 into main
All checks were successful
ci/woodpecker/push/payments_methods Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/payments_quotation Pipeline was successful

Reviewed-on: #526
Reviewed-by: tech <tech.sendico@proton.me>
This commit was merged in pull request #526.
This commit is contained in:
2026-02-18 19:40:58 +00:00
35 changed files with 1023 additions and 192 deletions

View File

@@ -216,7 +216,7 @@ func (p *Payments) List(ctx context.Context, filter *model.PaymentFilter) (*mode
if cursor := strings.TrimSpace(filter.Cursor); cursor != "" {
if oid, err := bson.ObjectIDFromHex(cursor); err == nil {
query = query.Comparison(repository.IDField(), builder.Gt, oid)
query = query.Comparison(repository.IDField(), builder.Lt, oid)
} else {
p.logger.Warn("Ignoring invalid payments cursor", zap.String("cursor", cursor), zap.Error(err))
}
@@ -224,7 +224,7 @@ func (p *Payments) List(ctx context.Context, filter *model.PaymentFilter) (*mode
limit := sanitizePaymentLimit(filter.Limit)
fetchLimit := limit + 1
query = query.Sort(repository.IDField(), true).Limit(&fetchLimit)
query = query.Sort(repository.IDField(), false).Limit(&fetchLimit)
payments := make([]*model.Payment, 0, fetchLimit)
decoder := func(cur *mongo.Cursor) error {