Skip to content

Commit 09c12d9

Browse files
committed
Update emailOverview.ts
1 parent 267497c commit 09c12d9

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

workers/email/scripts/emailOverview.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ import { ObjectId } from 'mongodb';
1919
import * as path from 'path';
2020
import * as dotenv from 'dotenv';
2121
import { HttpStatusCode } from '../../../lib/utils/consts';
22-
import { daysAfterPayday } from '../../../lib/utils/payday';
22+
import { countDaysAfterPayday } from '../../../lib/utils/payday';
2323

2424
/**
2525
* Merge email worker .env and root workers .env
@@ -148,7 +148,7 @@ class EmailTestServer {
148148
user,
149149
period: 10,
150150
reason: 'error on the payment server side',
151-
daysAfterPayday: await this.calculateDaysAfterPayday(workspace),
151+
daysAfterPayday: countDaysAfterPayday(workspace.lastChargeDate, workspace.paidUntil),
152152
};
153153

154154
try {
@@ -339,7 +339,7 @@ class EmailTestServer {
339339
return 0;
340340
}
341341

342-
const days = daysAfterPayday(workspace.lastChargeDate, workspace.paidUntil);
342+
const days = countDaysAfterPayday(workspace.lastChargeDate, workspace.paidUntil);
343343

344344
return days > 0 ? days : 0;
345345
}

0 commit comments

Comments
 (0)