whats is the use Notes.create(note) .then((data) => { res.send(data); }) .catch((err) => { res.status(500).send({ message: err.message || 'Some error occurred while create the Notes', }); }); code example

Example: whats is the use Notes.create(note) .then((data) => { res.send(data); }) .catch((err) => { res.status(500).send({ message: err.message || 'Some error occurred while create the Notes', }); });

Notes.create(note)
    .then((data) => {
      res.send(data);
    })
    .catch((err) => {
      res.status(500).send({
        message: err.message || 'Some error occurred while create the Notes',
      });