Donal Spring
2018-06-03 71eec436bdcbb5c86c11929033b6053a986e857b
src/store/actions.js
@@ -46,7 +46,8 @@
    // debugger
    const todo = {
      title: state.newTodo,
      completed: false
      completed: false,
      important: false
    };
    // console.info("TESTINT BLAH BLAH ", todo);
    return axios
@@ -98,14 +99,11 @@
  updateTodo({ commit, state }, { id, important }) {
    let i = state.todos.findIndex(todo => todo._id === id);
    if (important) {
      // TODO - add commit imporant here!
      commit("MARK_TODO_IMPORTANT", i);
    } else {
      commit("MARK_TODO_COMPLETED", i);
    }
    console.info(
      "TESTSY MC TESTFACES",
      config.todoEndpoint + "/" + state.todos[i]._id
    );
    // Fire and forget style backend update ;)
    return axios
      .put(config.todoEndpoint + "/" + state.todos[i]._id, state.todos[i])