Created
March 4, 2021 23:07
-
-
Save stoneboyindc/81765492d004365fed1d27194e58b5ce to your computer and use it in GitHub Desktop.
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
function bulkDelete(ids) { | |
const promises = ids.map((id) => { | |
const url = `${BASE_URL}/constellations/${id}`; | |
return axios.delete(url).then((data)=>{ | |
console.log(data); | |
return {id}; | |
}) | |
}); | |
return Promise.all(promises); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment