Skip to content

Instantly share code, notes, and snippets.

@reaganmcf
Last active August 30, 2018 16:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save reaganmcf/8eb30d5a66ef86da8cc0a8d4ba9a8bbd to your computer and use it in GitHub Desktop.
Save reaganmcf/8eb30d5a66ef86da8cc0a8d4ba9a8bbd to your computer and use it in GitHub Desktop.
removeChore added
/**
* Remove a chore from the bucket
*/
const removeChore = async function(chore) {
const params = {
slug: chore
.split(' ')
.join('-')
.toLowerCase()
};
var returnData = await choreBucket
.deleteObject(params)
.then(data => {
return data;
})
.catch(err => {
console.log(err);
return null;
});
return !!returnData;
};
module.exports = {
getChores,
addChore,
removeChore
};
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment