Skip to content

Bug: searchProducts does not filter out soft-deleted products #352

Description

@Aamod-Dev

File: BACKEND/controllers/product.controller.js (lines 378-379)

Severity: HIGH

Problem: Product.find({ name: regex }) has no isDeleted filter. Soft-deleted products appear in search results.

Fix: Add isDeleted filter to the query, consistent with getProducts.

Metadata

Metadata

Assignees

Labels

backendFor changes related to the Express server, API routes, or MongoDB modelsbugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions