Skip to content

Commit

Permalink
.
Browse files Browse the repository at this point in the history
  • Loading branch information
Saransh Balyan committed Dec 13, 2024
1 parent 32aa858 commit 372a580
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions Utils/Mongo/BaseController.js
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ const BaseController = (schema) => {

const deleteFromSchema = async (req, res) => {
try {
const { id } = req.body;
const result = await req.models[schema].findOneAndDelete({ _id: id });
const result = await req.models[schema].findOneAndDelete(req.body);
return res.status(200).json(result);
} catch (error) {
getError(error, res);
Expand Down

0 comments on commit 372a580

Please sign in to comment.