Skip to content

Commit 7c2b741

Browse files
committed
fix: remove duplicate/orphaned code left by merge conflict resolution in getQuickStats
The conflict resolution for #994 merged in both the old per-role query code and the new #911 single-query optimization instead of cleanly replacing one with the other, leaving an unused buyerTransactions variable and a duplicate totalProperties/activeListings declaration.
1 parent ef4e84e commit 7c2b741

1 file changed

Lines changed: 0 additions & 12 deletions

File tree

src/dashboard/dashboard.service.ts

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -73,18 +73,6 @@ export class DashboardService {
7373
}
7474

7575
private async getQuickStats(userId: string): Promise<QuickStatsDto> {
76-
// Get user's properties
77-
const properties = await this.prisma.property.findMany({
78-
where: { ownerId: userId },
79-
});
80-
81-
const totalProperties = properties.length;
82-
const activeListings = properties.filter((p) => p.status === 'ACTIVE').length;
83-
84-
// Get user's transactions (both as buyer and seller)
85-
const buyerTransactions = await this.prisma.transaction.findMany({
86-
where: { buyerId: userId },
87-
});
8876
// Issue #911 – Replace separate per-role queries and in-memory aggregation
8977
// with a single grouped count query + a single transaction query using OR.
9078

0 commit comments

Comments
 (0)