Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Commits on Apr 1, 2023

  1. Update userController.js/productController.js - replace deprecated re…

    …move() with deleteOne()
    
    #### DETAILS
    - Chapter: 11 Admin Screens -Part 1
    - Video: Deleting the Admin User
    - TimeStamp:  01:25
     - Location : ```userController.js ``` / ```productController.js
    
    #### ISSUE
    the ```remove()``` function is now deprecated and documentation/forums advise the use of ```deleteOne()``` or ```deleteMany()```    [https://www.mongodb.com/community/forums/t/error-message-remove-is-not-a-function-name-typeerror/207387]
    
    #### 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()``` **
    TracyChacon authored Apr 1, 2023
    Configuration menu
    Copy the full SHA
    e764872 View commit details
    Browse the repository at this point in the history