Skip to content

Commit

Permalink
Code security
Browse files Browse the repository at this point in the history
  • Loading branch information
jacoblurie29 committed Oct 12, 2023
1 parent ef17786 commit 79863c3
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pages/api/report.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ ${description}`;
return res.status(400).send('No new status provided');
}

const updatedReport = await Report.findByIdAndUpdate(id, { status: newStatus }, { new: true });
const updatedReport = await Report.findByIdAndUpdate(id, { status: { $eq: newStatus } }, { new: true });
return res.status(200).send(updatedReport);

case 'DELETE':
Expand All @@ -116,7 +116,7 @@ ${description}`;
return res.status(400).send('No report ID provided');
}

const deletedReport = await Report.findByIdAndDelete(reportId);
const deletedReport = await Report.findByIdAndDelete({ $eq: reportId });

// Use the GitHub API to delete an issue
const octokit2 = new Octokit({
Expand Down

0 comments on commit 79863c3

Please sign in to comment.