You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These two methods currently retrieve a task by its ID without considering the user ID of the task creator. As a result, they can perform actions on tasks not owned by the user. To address this, it would be better to use findOneAndUpdate and findOneAndDelete instead.
The text was updated successfully, but these errors were encountered:
Issue in
controllers/jobs.js
findByIdAndUpdate
findByIdAndRemove
These two methods currently retrieve a task by its ID without considering the user ID of the task creator. As a result, they can perform actions on tasks not owned by the user. To address this, it would be better to use
findOneAndUpdate
andfindOneAndDelete
instead.The text was updated successfully, but these errors were encountered: