mirror of
https://github.com/standardnotes/server
synced 2026-07-14 00:01:54 -04:00
fix(auth): counting active subscriptions
This commit is contained in:
@@ -19,9 +19,8 @@ export class MySQLUserSubscriptionRepository implements UserSubscriptionReposito
|
||||
async countActiveSubscriptions(): Promise<number> {
|
||||
return await this.ormRepository
|
||||
.createQueryBuilder()
|
||||
.select('user_uuid')
|
||||
.distinct()
|
||||
.where('ends_at > :timestamp', { timestamp: this.timer.getTimestampInMicroseconds() })
|
||||
.groupBy('user_uuid')
|
||||
.getCount()
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user