Merge pull request #7191 from firefly-iii/fix-7188

Fix #7188
This commit is contained in:
James Cole 2023-03-11 05:50:29 +01:00 committed by GitHub
commit 07cb7dd06e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 12 additions and 11 deletions

View File

@ -87,10 +87,14 @@ function stopSorting() {
// post new position via API!
//$.post('api/v1/accounts/' + id, {order: newOrder, _token: token});
$.ajax({
url: 'api/v1/accounts/' + id,
data: JSON.stringify({order: newOrder}),
type: 'PUT',
});
url: 'api/v1/accounts/' + id,
data: JSON.stringify({order: newOrder}),
type: 'PUT',
headers: {
'Content-Type': 'application/json',
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
},
});
});
}

View File

@ -120,7 +120,7 @@ function sortStop(event, ui) {
});
// do extra animation when done?
$.post('transactions/reorder', {items: submit, date: thisDate, _token: token});
$.post('transactions/reorder', {items: submit, date: thisDate});
current.animate({backgroundColor: "#5cb85c"}, 200, function () {
$(this).animate({backgroundColor: originalBG}, 200);

View File

@ -22,9 +22,7 @@
$.ajaxSetup({
headers: {
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content'),
'Content-Type': 'application/json'
'X-CSRF-Token': $('meta[name="csrf-token"]').attr('content')
}
});
@ -79,8 +77,7 @@ $(function () {
data: {
start: start.format('YYYY-MM-DD'),
end: end.format('YYYY-MM-DD'),
label: label,
_token: token
label: label
},
type: 'POST',
headers: {

View File

@ -45,7 +45,7 @@ function showHelp(e) {
}
function enableGuidance(route, specialPage) {
$.post('json/intro/enable/' + route + '/' + specialPage, {_token: token}).done(function (data) {
$.post('json/intro/enable/' + route + '/' + specialPage).done(function (data) {
alert(data.message);
}).fail(function () {
console.error('Could not re-enable introduction.');