This commit is contained in:
James Cole
2023-03-11 05:50:10 +01:00
parent 258dfb3d11
commit 38624442d1
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'),
},
});
});
}