summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--lib/toaster/toastergui/static/js/importlayer.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/lib/toaster/toastergui/static/js/importlayer.js b/lib/toaster/toastergui/static/js/importlayer.js
index 30dc28280..4784c657f 100644
--- a/lib/toaster/toastergui/static/js/importlayer.js
+++ b/lib/toaster/toastergui/static/js/importlayer.js
@@ -158,6 +158,7 @@ function importLayerPageInit (ctx) {
project_id: libtoaster.ctx.projectId,
layer_deps: layerDepsCsv,
local_source_dir: $('#local-dir-path').val(),
+ add_to_project: true,
};
if ($('input[name=repo]:checked').val() == "git") {
@@ -168,9 +169,9 @@ function importLayerPageInit (ctx) {
}
$.ajax({
- type: "POST",
- url: ctx.xhrImportLayerUrl,
- data: layerData,
+ type: "PUT",
+ url: ctx.xhrLayerUrl,
+ data: JSON.stringify(layerData),
headers: { 'X-CSRFToken' : $.cookie('csrftoken')},
success: function (data) {
if (data.error != "ok") {