Created
December 1, 2018 00:36
-
-
Save chamatt/7f6e23374ba36ca859196e49a93b4f1e to your computer and use it in GitHub Desktop.
DeleteThis
This file contains hidden or 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 DeletarPost(elemento) { | |
| const post = elemento.parentNode.parentNode.parentNode; | |
| const id = post.dataset.postId; | |
| axios.delete(`http://localhost:3000/posts/${id}`).then(() => ObterPosts()); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment