We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 7841e86 + 2e6e200 commit a4d0633Copy full SHA for a4d0633
src/api/repository/winnings.repo.ts
@@ -202,8 +202,9 @@ export class WinningsRepository {
202
this.prisma.winnings.count({ where: queryWhere }),
203
]);
204
205
- const usersPayoutStatusMap =
206
- await this.getUsersPayoutStatusForWinnings(winnings);
+ const usersPayoutStatusMap = winnings?.length
+ ? await this.getUsersPayoutStatusForWinnings(winnings)
207
+ : ({} as { [key: string]: payment_status });
208
209
result.data = {
210
winnings: winnings.map((item) => ({
0 commit comments