Skip to content

Commit 91f1c99

Browse files
committed
removed "active" from the query
1 parent 298940b commit 91f1c99

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

services/subscription.service.go

+2-2
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,7 @@ func (subscriptionService *SubscriptionService) SetDefaultCreditCard(accountID i
264264

265265
// RunNotifyExpiringTrials function
266266
func (subscriptionService *SubscriptionService) RunNotifyExpiringTrials() (err error) {
267-
params := bson.M{"active": false, "trialPeriodEndsAt": bson.M{operator.Lt: time.Now().AddDate(0, 0, 3), operator.Gt: time.Now()}}
267+
params := bson.M{"trialPeriodEndsAt": bson.M{operator.Lt: time.Now().AddDate(0, 0, 3), operator.Gt: time.Now()}}
268268
accounts, err := accountService.FindBy(params)
269269
for _, account := range accounts {
270270
user, _ := userService.OneBy(bson.M{"accountId": account.ID})
@@ -276,7 +276,7 @@ func (subscriptionService *SubscriptionService) RunNotifyExpiringTrials() (err e
276276

277277
// RunNotifyPaymentFailed function
278278
func (subscriptionService *SubscriptionService) RunNotifyPaymentFailed() (err error) {
279-
params := bson.M{"active": true, "paymentFailed": true, "paymentFailedSubscriptionEndsAt": bson.M{operator.Lt: time.Now().AddDate(0, 0, 3), operator.Gt: time.Now()}}
279+
params := bson.M{"paymentFailed": true, "paymentFailedSubscriptionEndsAt": bson.M{operator.Lt: time.Now().AddDate(0, 0, 3), operator.Gt: time.Now()}}
280280
accounts, err := accountService.FindBy(params)
281281
for _, account := range accounts {
282282
user, _ := userService.OneBy(bson.M{"accountId": account.ID})

0 commit comments

Comments
 (0)