Switch the importlayer.js to use the new REST API for importing a new layer.
Signed-off-by: Michael Wood <michael.g.wood@intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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") {
}
$.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") {