You can delete a data on Schema from database
User.deleteById(id,callback?)
Id; ID is a string and required.
Callback; Callback is a function and not required.
const id = "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" User.deleteById(id,(callback) => { console.log(callback) /* true */ })
Last updated 1 year ago