Last active
August 30, 2018 16:50
-
-
Save reaganmcf/8eb30d5a66ef86da8cc0a8d4ba9a8bbd to your computer and use it in GitHub Desktop.
removeChore added
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* 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