2020-01-28 10:50:41 +13:00
|
|
|
const sdk = require('node-appwrite');
|
|
|
|
|
|
|
|
// Init SDK
|
|
|
|
let client = new sdk.Client();
|
|
|
|
|
|
|
|
let database = new sdk.Database(client);
|
|
|
|
|
|
|
|
client
|
|
|
|
.setProject('')
|
2020-01-29 02:16:33 +13:00
|
|
|
.setKey('')
|
2020-01-28 10:50:41 +13:00
|
|
|
;
|
|
|
|
|
|
|
|
let promise = database.deleteDocument('[COLLECTION_ID]', '[DOCUMENT_ID]');
|
|
|
|
|
|
|
|
promise.then(function (response) {
|
|
|
|
console.log(response);
|
|
|
|
}, function (error) {
|
|
|
|
console.log(error);
|
|
|
|
});
|