From 9a5786841f2139ae5050a56930ee23ccd85bc904 Mon Sep 17 00:00:00 2001
From: leandro <leandroalmada86@gmail.com>
Date: Mon, 6 Sep 2021 10:52:03 +0200
Subject: [PATCH] update url for import

---
 src/store/modules/feature_type.js | 18 +++++++++++-------
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/src/store/modules/feature_type.js b/src/store/modules/feature_type.js
index 4bbb82bd..c925bcb6 100644
--- a/src/store/modules/feature_type.js
+++ b/src/store/modules/feature_type.js
@@ -93,18 +93,22 @@ const feature_type = {
     },
 
     POST_FEATURES_FROM_GEOJSON({ state, dispatch }, payload) {
-      const { slug, feature_type_slug } = payload
+      const { feature_type_slug } = payload
 
       if (state.filenameToImport.size > 0) {
         var formData = new FormData();
         formData.append("json_file", state.filenameToImport);
+        let params = {
+          'feature_type_slug': feature_type_slug
+        }
         let url =
-          process.env.VUE_APP_URL_BASE +
-          "projet/" + slug +
-          "/type-signalement/" + feature_type_slug +
-          "/importer-geojson/";
+          process.env.VUE_APP_DJANGO_API_BASE +
+          'import-tasks/?feature_type_slug=' +feature_type_slug 
+          // "projet/" + slug +
+          // "/type-signalement/" + feature_type_slug +
+          // "/importer-geojson/";
         axios
-          .post(url, formData, {
+          .post(url, formData, params, {
             headers: {
               "Content-Type": "multipart/form-data",
             },
@@ -125,7 +129,7 @@ const feature_type = {
     GET_IMPORTS({ commit }, feature_type) {
       let url =
         process.env.VUE_APP_DJANGO_API_BASE +
-        "import-tasks?feature_type_id=" +
+        "import-tasks?feature_type_slug=" +
         feature_type;
       axios
         .get(url)
-- 
GitLab