Last active
October 3, 2017 16:47
-
-
Save yagamicoder/6cf2d7a6d3aa000c82f9f7eb50b2198b 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
//Pretend delete() is a function that returns a Promise | |
const handleDeleteUser = id => { | |
try { | |
deleteUser(`/user/delete/${id}`).then(data => { | |
handleDeleteResponse(data); | |
}).catch(error => { | |
handleDeleteResponse(error); | |
}); | |
} catch (error) { | |
handleDeleteResponse(error); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment