Closed gkpty closed 5 years ago
//Delete Mutation
input DeletePostInput {
id: ID
}
//Remove from storage
Storage.remove('test.txt')
.then(result => console.log(result))
.catch(err => console.log(err));
//Delete from public s3 bucket (AWS-SDK-JS)
/ The following example deletes an object from an S3 bucket. /
var params = {
Bucket: "examplebucket",
Key: "objectkey.jpg"
};
s3.deleteObject(params, function(err, data) {
if (err) console.log(err, err.stack); // an error occurred
else console.log(data); // successful response
/*
data = {
}
*/
});
basic delete functionality for articles. will display an alert before permanently deleting and then un-publishing the article.