verification before payment and email fixes
This commit is contained in:
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user