Advertisement
Guest User

Untitled

a guest
Jul 23rd, 2019
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. const changeTodo = e => {
  2. e.preventDefault();
  3. const data = {
  4. user: info._id,
  5. _id: e.target.id
  6. };
  7. axios
  8. .put("http://localhost:5000/todos", {data} )
  9. // .then((window.location = "http://localhost:3000/todos"));
  10. .then(data => console.log(data))
  11. .catch(err => console.log(err));
  12. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement