Add server order to api call

This commit is contained in:
amcmanu3 2023-03-01 15:25:28 -05:00
parent c0381da880
commit d473a6ccf4
2 changed files with 6 additions and 5 deletions

View File

@ -89,6 +89,7 @@ class UsersController:
}, },
}, },
"hints": {"type": "boolean"}, "hints": {"type": "boolean"},
"server_order": {"type": "string"},
} }
# ********************************************************************************** # **********************************************************************************

View File

@ -1042,12 +1042,12 @@
const token = getCookie("_xsrf") const token = getCookie("_xsrf")
$.ajax({ $.ajax({
type: "POST", type: "PATCH",
headers: { 'X-XSRFToken': token }, headers: { 'X-XSRFToken': token },
url: '/ajax/send_order?order=' + id_string, url: `/api/v2/users/@me`,
data: { data: JSON.stringify({
order: id_string, server_order: id_string,
}, }),
success: function (data) { success: function (data) {
console.log("got response:"); console.log("got response:");
console.log(data); console.log(data);