move wsid to authz

This commit is contained in:
Sainan 2025-09-08 05:19:54 +02:00
parent 26d30105d6
commit 3b10dc374f

View File

@ -63,7 +63,7 @@ function openWebSocket() {
}
$(".displayname").text(data.DisplayName);
window.accountId = data.id;
window.authz = "accountId=" + data.id + "&nonce=" + data.Nonce;
window.authz = "accountId=" + data.id + "&nonce=" + data.Nonce + "&wsid=" + wsid;
if (window.dict) {
updateLocElements();
}
@ -2582,7 +2582,7 @@ function disposeOfGear(category, oid) {
];
revalidateAuthz().then(() => {
$.post({
url: "/api/sell.php?" + window.authz + "&wsid=" + wsid,
url: "/api/sell.php?" + window.authz,
contentType: "text/plain",
data: JSON.stringify(data)
});
@ -2604,7 +2604,7 @@ function disposeOfItems(category, type, count) {
];
revalidateAuthz().then(() => {
$.post({
url: "/api/sell.php?" + window.authz + "&wsid=" + wsid,
url: "/api/sell.php?" + window.authz,
contentType: "text/plain",
data: JSON.stringify(data)
});
@ -2858,7 +2858,7 @@ for (const id of uiConfigs) {
value = parseInt(value);
}
$.post({
url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
url: "/custom/setConfig?" + window.authz,
contentType: "application/json",
data: JSON.stringify({ [id]: value })
});
@ -2866,7 +2866,7 @@ for (const id of uiConfigs) {
} else if (elm.type == "checkbox") {
elm.onchange = function () {
$.post({
url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
url: "/custom/setConfig?" + window.authz,
contentType: "application/json",
data: JSON.stringify({ [id]: this.checked })
}).then(() => {
@ -2893,7 +2893,7 @@ document.querySelectorAll(".config-form .input-group").forEach(grp => {
function doSaveConfigInt(id) {
$.post({
url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
url: "/custom/setConfig?" + window.authz,
contentType: "application/json",
data: JSON.stringify({
[id]: parseInt(document.getElementById(id).value)
@ -2903,7 +2903,7 @@ function doSaveConfigInt(id) {
function doSaveConfigFloat(id) {
$.post({
url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
url: "/custom/setConfig?" + window.authz,
contentType: "application/json",
data: JSON.stringify({
[id]: parseFloat(document.getElementById(id).value)
@ -2913,7 +2913,7 @@ function doSaveConfigFloat(id) {
function doSaveConfigStringArray(id) {
$.post({
url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
url: "/custom/setConfig?" + window.authz,
contentType: "application/json",
data: JSON.stringify({
[id]: document
@ -3040,7 +3040,7 @@ document.querySelectorAll("#account-cheats input[type=checkbox]").forEach(elm =>
elm.onchange = function () {
revalidateAuthz().then(() => {
$.post({
url: "/custom/setAccountCheat?" + window.authz /*+ "&wsid=" + wsid*/,
url: "/custom/setAccountCheat?" + window.authz,
contentType: "application/json",
data: JSON.stringify({
key: elm.id,
@ -3112,7 +3112,7 @@ function doRemoveUnrankedMods() {
req.done(inventory => {
window.itemListPromise.then(itemMap => {
$.post({
url: "/api/sell.php?" + window.authz + "&wsid=" + wsid,
url: "/api/sell.php?" + window.authz,
contentType: "text/plain",
data: JSON.stringify({
SellCurrency: "SC_RegularCredits",