@@ -264,7 +264,7 @@ func (subscriptionService *SubscriptionService) SetDefaultCreditCard(accountID i
264264
265265// RunNotifyExpiringTrials function 
266266func  (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 
278278func  (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