Skip to content

Commit

Permalink
[IMP] Removed parameter which was always set to true
Browse files Browse the repository at this point in the history
  • Loading branch information
c8y3 committed Oct 18, 2024
1 parent d02282f commit 7854471
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions ui/src/pages/common.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function set_page_warning(msg) {
$('#page_warning').text(msg);
}

function api_error(propagate_api_error){
function api_error(propagate_api_error) {
if (propagate_api_error) {
if(jqXHR.responseJSON && jqXHR.status == 400) {
propagate_form_api_errors(jqXHR.responseJSON.data);
Expand Down Expand Up @@ -400,19 +400,19 @@ function post_request_api(uri, data, propagate_api_error, beforeSend_fn, cid, on
});
}

function post_request_data_api(uri, data, propagate_api_error, beforeSend_fn) {
function post_request_data_api(uri, data, beforeSend_fn) {
return $.ajax({
url: uri + case_param(),
type: 'POST',
data: data,
dataType: "json",
dataType: 'json',
contentType: false,
processData: false,
beforeSend: function(jqXHR, settings) {
sendBefore(beforeSend_fn, settings);
},
error: function(jqXHR) {
api_error(propagate_api_error);
api_error(true);
}
});
}
Expand Down
4 changes: 2 additions & 2 deletions ui/src/pages/datastore.js
Original file line number Diff line number Diff line change
Expand Up @@ -290,7 +290,7 @@ async function save_ds_multi_files(node, index_i) {
let file = $('#input_upload_ds_files').prop('files')[index];
formData.append('file_content', file);
formData.append('file_original_name', file.name);
await post_request_data_api(`/datastore/file/add/${node}`, formData, true, function () {
await post_request_data_api(`/datastore/file/add/${node}`, formData, function () {
window.swal({
title: `File ${file.name} is uploading. (${index}/${totalFiles} files)`,
text: "Please wait. This window will close automatically when the file is uploaded.",
Expand Down Expand Up @@ -319,7 +319,7 @@ function save_ds_file(node, file_id) {
uri = `/datastore/file/update/${file_id}`;
}

post_request_data_api(uri, formData, true, function() {
post_request_data_api(uri, formData, function() {
window.swal({
title: "File is uploading",
text: "Please wait. This window will close automatically when the file is uploaded.",
Expand Down

0 comments on commit 7854471

Please sign in to comment.