move wsid to authz

This commit is contained in:
Sainan 2025-09-08 05:19:54 +02:00
parent 047b21d776
commit 43bf12d351

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();
}
@ -1913,7 +1913,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)
});
@ -1935,7 +1935,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)
});
@ -2189,7 +2189,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 })
});
@ -2197,7 +2197,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(() => {
@ -2224,7 +2224,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)
@ -2234,7 +2234,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)
@ -2244,7 +2244,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
@ -2371,7 +2371,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,
@ -2428,7 +2428,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",