Skip to content
Snippets Groups Projects
Commit f4ddd432 authored by Timothee P's avatar Timothee P :sunflower:
Browse files

switch get feature to v2 endpoints

parent d72408e4
No related branches found
No related tags found
1 merge request!541REDMINE_ISSUE-16246| Ajouter un filtre sur la querystring pour récupérer les signalement modifié depuis une certaine date
......@@ -127,7 +127,7 @@ const feature = {
commit('SET_CANCELLABLE_SEARCH_REQUEST', cancelToken, { root: true });
commit('SET_FEATURES', []);
commit('SET_FEATURES_COUNT', 0);
let url = `${rootState.configuration.VUE_APP_DJANGO_API_BASE}projects/${project_slug}/feature/`;
let url = `${rootState.configuration.VUE_APP_DJANGO_API_BASE}v2/features/?project__slug=${project_slug}`;
if (feature_type__slug) {
url = url.concat('', `${url.includes('?') ? '&' : '?'}feature_type__slug=${feature_type__slug}`);
}
......@@ -164,7 +164,7 @@ const feature = {
dispatch('CANCEL_CURRENT_SEARCH_REQUEST', null, { root: true });
const cancelToken = axios.CancelToken.source();
commit('SET_CANCELLABLE_SEARCH_REQUEST', cancelToken, { root: true });
const url = `${rootState.configuration.VUE_APP_DJANGO_API_BASE}projects/${project_slug}/feature/?id=${feature_id}`;
const url = `${rootState.configuration.VUE_APP_DJANGO_API_BASE}v2/features/${feature_id}/?project__slug=${project_slug}`;
return axios
.get(url, { cancelToken: cancelToken.token })
.then((response) => {
......
......@@ -451,7 +451,6 @@ export default {
})
.then(() => {
this.featuresLoading = false;
console.log('addFeatures');
mapService.addFeatures({
features: [...this.features, ...featuresOffline],
featureTypes: this.feature_types,
......
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