improve: pass nonce for webui requests
This commit is contained in:
parent
63712121af
commit
f7c09b500b
@ -24,6 +24,7 @@ function loginFromLocalStorage() {
|
|||||||
$("#main-view").removeClass("d-none");
|
$("#main-view").removeClass("d-none");
|
||||||
$(".displayname").text(data.DisplayName);
|
$(".displayname").text(data.DisplayName);
|
||||||
window.accountId = data.id;
|
window.accountId = data.id;
|
||||||
|
window.authz = "accountId=" + data.id + "&nonce=" + data.Nonce;
|
||||||
updateInventory();
|
updateInventory();
|
||||||
});
|
});
|
||||||
req.fail(() => {
|
req.fail(() => {
|
||||||
@ -61,7 +62,7 @@ window.itemListPromise = new Promise(resolve => {
|
|||||||
});
|
});
|
||||||
|
|
||||||
function updateInventory() {
|
function updateInventory() {
|
||||||
const req = $.get("/api/inventory.php?accountId=" + window.accountId);
|
const req = $.get("/api/inventory.php?" + window.authz);
|
||||||
req.done(data => {
|
req.done(data => {
|
||||||
window.itemListPromise.then(itemMap => {
|
window.itemListPromise.then(itemMap => {
|
||||||
document.getElementById("warframe-list").innerHTML = "";
|
document.getElementById("warframe-list").innerHTML = "";
|
||||||
@ -215,7 +216,7 @@ function addGearExp(category, oid, xp) {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/missionInventoryUpdate.php?accountId=" + window.accountId,
|
url: "/api/missionInventoryUpdate.php?" + window.authz,
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
data: JSON.stringify(data)
|
data: JSON.stringify(data)
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
@ -235,7 +236,7 @@ function disposeOfGear(category, oid) {
|
|||||||
}
|
}
|
||||||
];
|
];
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/sell.php?accountId=" + window.accountId,
|
url: "/api/sell.php?" + window.authz,
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
data: JSON.stringify(data)
|
data: JSON.stringify(data)
|
||||||
}).done(function () {
|
}).done(function () {
|
||||||
@ -250,7 +251,7 @@ function doAcquireMiscItems() {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
$.post({
|
$.post({
|
||||||
url: "/api/missionInventoryUpdate.php?accountId=" + window.accountId,
|
url: "/api/missionInventoryUpdate.php?" + window.authz,
|
||||||
contentType: "text/plain",
|
contentType: "text/plain",
|
||||||
data: JSON.stringify({
|
data: JSON.stringify({
|
||||||
MiscItems: [
|
MiscItems: [
|
||||||
|
Loading…
x
Reference in New Issue
Block a user