move wsid to authz
This commit is contained in:
		
							parent
							
								
									047b21d776
								
							
						
					
					
						commit
						43bf12d351
					
				@ -63,7 +63,7 @@ function openWebSocket() {
 | 
				
			|||||||
            }
 | 
					            }
 | 
				
			||||||
            $(".displayname").text(data.DisplayName);
 | 
					            $(".displayname").text(data.DisplayName);
 | 
				
			||||||
            window.accountId = data.id;
 | 
					            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) {
 | 
					            if (window.dict) {
 | 
				
			||||||
                updateLocElements();
 | 
					                updateLocElements();
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
@ -1913,7 +1913,7 @@ function disposeOfGear(category, oid) {
 | 
				
			|||||||
        ];
 | 
					        ];
 | 
				
			||||||
        revalidateAuthz().then(() => {
 | 
					        revalidateAuthz().then(() => {
 | 
				
			||||||
            $.post({
 | 
					            $.post({
 | 
				
			||||||
                url: "/api/sell.php?" + window.authz + "&wsid=" + wsid,
 | 
					                url: "/api/sell.php?" + window.authz,
 | 
				
			||||||
                contentType: "text/plain",
 | 
					                contentType: "text/plain",
 | 
				
			||||||
                data: JSON.stringify(data)
 | 
					                data: JSON.stringify(data)
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
@ -1935,7 +1935,7 @@ function disposeOfItems(category, type, count) {
 | 
				
			|||||||
    ];
 | 
					    ];
 | 
				
			||||||
    revalidateAuthz().then(() => {
 | 
					    revalidateAuthz().then(() => {
 | 
				
			||||||
        $.post({
 | 
					        $.post({
 | 
				
			||||||
            url: "/api/sell.php?" + window.authz + "&wsid=" + wsid,
 | 
					            url: "/api/sell.php?" + window.authz,
 | 
				
			||||||
            contentType: "text/plain",
 | 
					            contentType: "text/plain",
 | 
				
			||||||
            data: JSON.stringify(data)
 | 
					            data: JSON.stringify(data)
 | 
				
			||||||
        });
 | 
					        });
 | 
				
			||||||
@ -2189,7 +2189,7 @@ for (const id of uiConfigs) {
 | 
				
			|||||||
                value = parseInt(value);
 | 
					                value = parseInt(value);
 | 
				
			||||||
            }
 | 
					            }
 | 
				
			||||||
            $.post({
 | 
					            $.post({
 | 
				
			||||||
                url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
 | 
					                url: "/custom/setConfig?" + window.authz,
 | 
				
			||||||
                contentType: "application/json",
 | 
					                contentType: "application/json",
 | 
				
			||||||
                data: JSON.stringify({ [id]: value })
 | 
					                data: JSON.stringify({ [id]: value })
 | 
				
			||||||
            });
 | 
					            });
 | 
				
			||||||
@ -2197,7 +2197,7 @@ for (const id of uiConfigs) {
 | 
				
			|||||||
    } else if (elm.type == "checkbox") {
 | 
					    } else if (elm.type == "checkbox") {
 | 
				
			||||||
        elm.onchange = function () {
 | 
					        elm.onchange = function () {
 | 
				
			||||||
            $.post({
 | 
					            $.post({
 | 
				
			||||||
                url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
 | 
					                url: "/custom/setConfig?" + window.authz,
 | 
				
			||||||
                contentType: "application/json",
 | 
					                contentType: "application/json",
 | 
				
			||||||
                data: JSON.stringify({ [id]: this.checked })
 | 
					                data: JSON.stringify({ [id]: this.checked })
 | 
				
			||||||
            }).then(() => {
 | 
					            }).then(() => {
 | 
				
			||||||
@ -2224,7 +2224,7 @@ document.querySelectorAll(".config-form .input-group").forEach(grp => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function doSaveConfigInt(id) {
 | 
					function doSaveConfigInt(id) {
 | 
				
			||||||
    $.post({
 | 
					    $.post({
 | 
				
			||||||
        url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
 | 
					        url: "/custom/setConfig?" + window.authz,
 | 
				
			||||||
        contentType: "application/json",
 | 
					        contentType: "application/json",
 | 
				
			||||||
        data: JSON.stringify({
 | 
					        data: JSON.stringify({
 | 
				
			||||||
            [id]: parseInt(document.getElementById(id).value)
 | 
					            [id]: parseInt(document.getElementById(id).value)
 | 
				
			||||||
@ -2234,7 +2234,7 @@ function doSaveConfigInt(id) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function doSaveConfigFloat(id) {
 | 
					function doSaveConfigFloat(id) {
 | 
				
			||||||
    $.post({
 | 
					    $.post({
 | 
				
			||||||
        url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
 | 
					        url: "/custom/setConfig?" + window.authz,
 | 
				
			||||||
        contentType: "application/json",
 | 
					        contentType: "application/json",
 | 
				
			||||||
        data: JSON.stringify({
 | 
					        data: JSON.stringify({
 | 
				
			||||||
            [id]: parseFloat(document.getElementById(id).value)
 | 
					            [id]: parseFloat(document.getElementById(id).value)
 | 
				
			||||||
@ -2244,7 +2244,7 @@ function doSaveConfigFloat(id) {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
function doSaveConfigStringArray(id) {
 | 
					function doSaveConfigStringArray(id) {
 | 
				
			||||||
    $.post({
 | 
					    $.post({
 | 
				
			||||||
        url: "/custom/setConfig?" + window.authz + "&wsid=" + wsid,
 | 
					        url: "/custom/setConfig?" + window.authz,
 | 
				
			||||||
        contentType: "application/json",
 | 
					        contentType: "application/json",
 | 
				
			||||||
        data: JSON.stringify({
 | 
					        data: JSON.stringify({
 | 
				
			||||||
            [id]: document
 | 
					            [id]: document
 | 
				
			||||||
@ -2371,7 +2371,7 @@ document.querySelectorAll("#account-cheats input[type=checkbox]").forEach(elm =>
 | 
				
			|||||||
    elm.onchange = function () {
 | 
					    elm.onchange = function () {
 | 
				
			||||||
        revalidateAuthz().then(() => {
 | 
					        revalidateAuthz().then(() => {
 | 
				
			||||||
            $.post({
 | 
					            $.post({
 | 
				
			||||||
                url: "/custom/setAccountCheat?" + window.authz /*+ "&wsid=" + wsid*/,
 | 
					                url: "/custom/setAccountCheat?" + window.authz,
 | 
				
			||||||
                contentType: "application/json",
 | 
					                contentType: "application/json",
 | 
				
			||||||
                data: JSON.stringify({
 | 
					                data: JSON.stringify({
 | 
				
			||||||
                    key: elm.id,
 | 
					                    key: elm.id,
 | 
				
			||||||
@ -2428,7 +2428,7 @@ function doRemoveUnrankedMods() {
 | 
				
			|||||||
        req.done(inventory => {
 | 
					        req.done(inventory => {
 | 
				
			||||||
            window.itemListPromise.then(itemMap => {
 | 
					            window.itemListPromise.then(itemMap => {
 | 
				
			||||||
                $.post({
 | 
					                $.post({
 | 
				
			||||||
                    url: "/api/sell.php?" + window.authz + "&wsid=" + wsid,
 | 
					                    url: "/api/sell.php?" + window.authz,
 | 
				
			||||||
                    contentType: "text/plain",
 | 
					                    contentType: "text/plain",
 | 
				
			||||||
                    data: JSON.stringify({
 | 
					                    data: JSON.stringify({
 | 
				
			||||||
                        SellCurrency: "SC_RegularCredits",
 | 
					                        SellCurrency: "SC_RegularCredits",
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user