logo

English

Delete Documents



The delete method accepts two parameters:
lableb.delete(collection, documentID)
  1. collection: documents collection name.
  2. documentID: ID of the document to be deleted.
Example:
lableb.delete('posts', 'document id')
  .then((res) => {
    console.log(res);
  })
  .catch((e) => {
    console.log(e.response);
  });


Example response:
{
  deleted: true,
  message: 'Document of ID (id) has been deleted'
}