Skip to content

Commit a748ee3

Browse files
authored
Merge pull request #64 from Dnreikronos/fix/revenue-all-plans
fix: query revenue across all user plans instead of current page
2 parents cb0e750 + 36eb785 commit a748ee3

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

backend/src/controllers/plan.controller.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -212,7 +212,7 @@ export const getAllPlansController = async (
212212

213213
const revenueAggregate = await prisma.paymentExecution.aggregate({
214214
where: {
215-
planId: { in: plans.map((p) => p.id) },
215+
plan: { receiverId: userId },
216216
status: "SUCCESS",
217217
},
218218
_sum: {

0 commit comments

Comments
 (0)