controllers/thought-controller.js
// use to delete thoughts when users are already deleted
use to delete thoughts when users are already deleted
use to delete thoughts when users are already deleted
deleteAllThoughts(req, res) {
    Thought.deleteMany({}).then(() => {
      console.log("Data Deleted");
      res.json({ message: "Thoughts deleted" });
    });
  }
deleteAllThoughts ( req , res ) { Thought . deleteMany ( { } ) . then ( ( ) => { console . log ( "Data Deleted" ) ; res . json ( { message : "Thoughts deleted" } ) ; } ) ; }
use to delete thoughts when users are already deleted
use to delete thoughts when users are already deleted