From eb552777fb5c1b17e77fbe1fb2259494249bf6b8 Mon Sep 17 00:00:00 2001 From: VoltPrime Date: Mon, 17 Nov 2025 05:16:23 -0500 Subject: [PATCH] Tiny cleanup --- src/controllers/api/artifactsController.ts | 4 ++-- src/controllers/api/upgradesController.ts | 1 - 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/controllers/api/artifactsController.ts b/src/controllers/api/artifactsController.ts index b9109039..9fbe5cb9 100644 --- a/src/controllers/api/artifactsController.ts +++ b/src/controllers/api/artifactsController.ts @@ -1,5 +1,5 @@ import { getJSONfromString } from "../../helpers/stringHelpers.ts"; -import { getAccountForRequest, getAccountIdForRequest } from "../../services/loginService.ts"; +import { getAccountForRequest } from "../../services/loginService.ts"; import type { RequestHandler } from "express"; import type { IInventoryClient, @@ -12,7 +12,7 @@ import { toLegacyOid, version_compare } from "../../helpers/inventoryHelpers.ts" export const artifactsController: RequestHandler = async (req, res) => { const account = await getAccountForRequest(req); - const accountId = await getAccountIdForRequest(req); + const accountId = account._id.toString(); const artifactsData = getJSONfromString(String(req.body)); const { Upgrade, LevelDiff, Cost, FusionPointCost, Consumed, Fingerprint } = artifactsData; diff --git a/src/controllers/api/upgradesController.ts b/src/controllers/api/upgradesController.ts index 440426c7..4ad1130e 100644 --- a/src/controllers/api/upgradesController.ts +++ b/src/controllers/api/upgradesController.ts @@ -280,7 +280,6 @@ export const upgradesController: RequestHandler = async (req, res) => { } } } - await inventory.save(); res.json({ InventoryChanges: inventoryChanges }); };