Browse Source

refactor: move countUsersWithAnalytics above to maintain alphabatical order

pull/4058/head
Qurban Ahmad 9 months ago
parent
commit
910334f101
  1. 37
      apps/api/src/app/admin/admin.service.ts

37
apps/api/src/app/admin/admin.service.ts

@ -518,6 +518,25 @@ export class AdminService {
return response; return response;
} }
private async countUsersWithAnalytics(): Promise<number> {
let where: Prisma.UserWhereInput;
if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) {
where = {
NOT: {
Analytics: null
}
};
}
const usersCountWithAnalytics = await this.prismaService.user.count({
where
});
return usersCountWithAnalytics;
}
private getExtendedPrismaClient() { private getExtendedPrismaClient() {
Logger.debug('Connect extended prisma client', 'AdminService'); Logger.debug('Connect extended prisma client', 'AdminService');
@ -650,24 +669,6 @@ export class AdminService {
return { marketData, count: marketData.length }; return { marketData, count: marketData.length };
} }
private async countUsersWithAnalytics(): Promise<number> {
let where: Prisma.UserWhereInput;
if (this.configurationService.get('ENABLE_FEATURE_SUBSCRIPTION')) {
where = {
NOT: {
Analytics: null
}
};
}
const usersCountWithAnalytics = await this.prismaService.user.count({
where
});
return usersCountWithAnalytics;
}
private async getUsersWithAnalytics({ private async getUsersWithAnalytics({
skip, skip,
take take

Loading…
Cancel
Save