Skip to content
Snippets Groups Projects
Commit c5dc3911 authored by leandro's avatar leandro
Browse files

add function to get feature_type in store

parent 9f94759c
No related branches found
No related tags found
No related merge requests found
......@@ -3,7 +3,7 @@
<table class="ui collapsing celled table">
<thead>
<tr>
<th>Fichier</th>
<th>Fichiers importés</th>
<th>Status</th>
</tr>
</thead>
......
import axios from "axios"
import store from '@/store';
const feature_type = {
namespaced: true,
state: {
......@@ -72,17 +76,17 @@ const feature_type = {
const data = { form: state.form, formset: state.customForms }
console.log("data", data)
/* axios
.post(`${DJANGO_API_BASE}feature_type/`, data)
axios
.post(`${process.env.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");
const routerHistory = this.$router.options.routerHistory
store.commit("SET_USER", response.data.user);
this.$router.push(routerHistory[routerHistory.length - 1] || "/")
store.dispatch("GET_USER_LEVEL_PROJECTS");
})
.catch(() => {
commit("SET_USER", false)
}); */
store.commit("SET_USER", false)
});
},
},
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment