2
0
mirror of https://github.com/cderche/greenlock-challenge-s3 synced 2025-05-10 15:36:33 +00:00
2019-05-08 17:43:45 +01:00

10 lines
440 B
JavaScript

module.exports.remove = (opts, options, s3) => {
challengeKey = options.directory + opts.challenge.token;
return s3.deleteObject({ Key: challengeKey, Bucket: options.bucketName }).promise().then(function (data) {
console.log('Successfully deleted challenge.');
return data;
}).catch(function (err) {
console.error('There was an error deleting your challenge: ', err.message);
throw err;
});
}