bradtraversy / proshop_mern

Shopping cart built with MERN & Redux
1.99k stars 1.18k forks source link

FIX - Deprecated remove() func Breaks app - causes MongoDB error #215

Open TracyChacon opened 1 year ago

TracyChacon commented 1 year ago

DETAILS

ISSUE

the remove() function is now deprecated and documentation/ mongodb forum advise the use of deleteOne() or deleteMany()

PROPOSED CHANGE

The proposed code change makes it so that the app doesn't break.

Change any invocations ( in userController.js/productController.js in the backend) of :

remove()

To :

deleteOne()