use inventory projection in setWeaponSkillTreeController
All checks were successful
Build / build (20) (push) Successful in 38s
Build / build (18) (push) Successful in 1m16s
Build / build (22) (push) Successful in 1m13s
Build / build (18) (pull_request) Successful in 41s
Build / build (20) (pull_request) Successful in 1m13s
Build / build (22) (pull_request) Successful in 1m15s

This commit is contained in:
Sainan 2025-03-31 03:08:43 +02:00
parent 535dae40e6
commit 448ceede9f

View File

@ -6,7 +6,7 @@ import { WeaponTypeInternal } from "@/src/services/itemDataService";
export const setWeaponSkillTreeController: RequestHandler = async (req, res) => { export const setWeaponSkillTreeController: RequestHandler = async (req, res) => {
const accountId = await getAccountIdForRequest(req); const accountId = await getAccountIdForRequest(req);
const inventory = await getInventory(accountId); const inventory = await getInventory(accountId, req.query.Category as string);
const payload = getJSONfromString<ISetWeaponSkillTreeRequest>(String(req.body)); const payload = getJSONfromString<ISetWeaponSkillTreeRequest>(String(req.body));
const item = inventory[req.query.Category as WeaponTypeInternal].id(req.query.ItemId as string)!; const item = inventory[req.query.Category as WeaponTypeInternal].id(req.query.ItemId as string)!;