diff --git a/src/agents/agents.service.ts b/src/agents/agents.service.ts index 66c2c40..a156a7e 100644 --- a/src/agents/agents.service.ts +++ b/src/agents/agents.service.ts @@ -196,8 +196,10 @@ export class AgentsService { const skip = (page - 1) * limit; - // Build where clause - const where: Prisma.AgentProfileWhereInput = {}; + // Build where clause — only show admin-approved profiles in search + const where: Prisma.AgentProfileWhereInput = { + verificationStatus: 'APPROVED', + }; if (search) { where.OR = [ @@ -458,6 +460,7 @@ export class AgentsService { where: { isVerified: true, isFeatured: true, + verificationStatus: 'APPROVED', }, take: limit, orderBy: [{ averageRating: 'desc' }, { totalReviews: 'desc' }], @@ -481,6 +484,7 @@ export class AgentsService { where: { isVerified: true, totalReviews: { gte: 5 }, + verificationStatus: 'APPROVED', }, take: limit, orderBy: [{ averageRating: 'desc' }, { totalReviews: 'desc' }],