diff --git a/src/controllers/custom/updateFingerprintController.ts b/src/controllers/custom/updateFingerprintController.ts index 84e70dd5..df82d412 100644 --- a/src/controllers/custom/updateFingerprintController.ts +++ b/src/controllers/custom/updateFingerprintController.ts @@ -7,21 +7,19 @@ export const updateFingerprintController: RequestHandler = async (req, res) => { const accountId = await getAccountIdForRequest(req); const request = req.body as IUpdateFingerPrintRequest; const inventory = await getInventory(accountId, request.category); - if (inventory) { - const item = inventory[request.category].id(request.oid); - if (item) { - if (request.action == "set" && request.upgradeFingerprint.buffs[0].Tag) { - const newUpgradeFingerprint = request.upgradeFingerprint; - if (!newUpgradeFingerprint.compact) newUpgradeFingerprint.compact = item.ItemType; + const item = inventory[request.category].id(request.oid); + if (item) { + if (request.action == "set" && request.upgradeFingerprint.buffs[0].Tag) { + const newUpgradeFingerprint = request.upgradeFingerprint; + if (!newUpgradeFingerprint.compact) newUpgradeFingerprint.compact = item.ItemType; - item.UpgradeType = request.upgradeType; - item.UpgradeFingerprint = JSON.stringify(newUpgradeFingerprint); - } else if (request.action == "remove") { - item.UpgradeFingerprint = undefined; - item.UpgradeType = undefined; - } - await inventory.save(); + item.UpgradeType = request.upgradeType; + item.UpgradeFingerprint = JSON.stringify(newUpgradeFingerprint); + } else if (request.action == "remove") { + item.UpgradeFingerprint = undefined; + item.UpgradeType = undefined; } + await inventory.save(); } res.end(); }; diff --git a/static/webui/index.html b/static/webui/index.html index 6291c448..a80e28e9 100644 --- a/static/webui/index.html +++ b/static/webui/index.html @@ -458,7 +458,7 @@

-