Delete a document
To delete an existing document, you'll need a reference to it. You can directly reference a document by its ID, or you can access the ref
property on a snapshot of the document.
const ref = adamite()
.database()
.collection("projects")
.doc("documentId")
Once you have a reference to the document, you can delete it by calling the delete
function.
await doc.delete();
Last updated
Was this helpful?