Skip to content

Instantly share code, notes, and snippets.

@stoneboyindc
Created March 4, 2021 23:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stoneboyindc/81765492d004365fed1d27194e58b5ce to your computer and use it in GitHub Desktop.
Save stoneboyindc/81765492d004365fed1d27194e58b5ce to your computer and use it in GitHub Desktop.
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