Skip to content
Snippets Groups Projects

display message if feature doesn't exist & wait response for redirect

2 files
+ 323
336
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -190,41 +190,16 @@ const feature = {
});
},
/* GET_FEATURE_LINK({ commit }, featureId) {
featureAPI
.getlinked_features(featureId)
.then((data) => commit("SET_FEATURE_LINKS", data));
} */
DELETE_FEATURE({ state, rootState }, feature_id) {
console.log("Deleting feature:", feature_id, state)
const url = `${rootState.configuration.VUE_APP_DJANGO_API_BASE}features/${feature_id}`;
axios
.delete(url, {
})
.then()
return axios
.delete(url)
.then((response) => response)
.catch(() => {
return false;
});
},
// POST_COMMENT({ state }, data) {
//console.log("post comment", data, state)
/* axios
.post(`${rootState.configuration.VUE_APP_DJANGO_API_BASE}feature_type/`, data)
.then((response) => {
const routerHistory = router.options.routerHistory
commit("SET_USER", response.data.user);
router.push(routerHistory[routerHistory.length - 1] || "/")
dispatch("GET_USER_LEVEL_PROJECTS");
})
.catch(() => {
commit("SET_USER", false)
}); */
// },
// EXPORT_FEATURES({ /* state */ }) {
//console.log("Export features", state.features)
// }
},
}
Loading