fix: remove truncated management totals
This commit is contained in:
@@ -93,6 +93,8 @@ describe('TenantsService', () => {
|
||||
expect(prisma.tenant.findMany).toHaveBeenCalledWith(expect.objectContaining({
|
||||
where: { status: { not: 'deleted' } },
|
||||
}));
|
||||
expect(prisma.tenant.findMany.mock.calls[0][0]).not.toHaveProperty('take');
|
||||
expect(prisma.tenantAccount.findMany).toHaveBeenCalledWith();
|
||||
expect(prisma.smsMessageRecord.groupBy).toHaveBeenCalledWith(expect.objectContaining({
|
||||
by: ['tenantId'],
|
||||
_sum: { amountCents: true },
|
||||
|
||||
@@ -40,7 +40,6 @@ export class TenantsService {
|
||||
return this.prisma.tenant.findMany({
|
||||
include: { enterpriseCertifications: { orderBy: { submittedAt: 'desc' }, take: 1 } },
|
||||
orderBy: { createdAt: 'desc' },
|
||||
take: 100,
|
||||
}).then((items) => items.map(withEnterpriseProfile));
|
||||
}
|
||||
|
||||
@@ -51,9 +50,8 @@ export class TenantsService {
|
||||
where: { status: { not: 'deleted' } },
|
||||
include: { enterpriseCertifications: { orderBy: { submittedAt: 'desc' }, take: 1 } },
|
||||
orderBy: { createdAt: 'desc' },
|
||||
take: 100,
|
||||
}),
|
||||
this.prisma.tenantAccount.findMany({ take: 200 }),
|
||||
this.prisma.tenantAccount.findMany(),
|
||||
this.prisma.smsMessageRecord.groupBy({
|
||||
by: ['tenantId'],
|
||||
where: { queuedAt: { gte: sinceToday } },
|
||||
|
||||
Reference in New Issue
Block a user