diff --git a/src/controllers/api/guildTechController.ts b/src/controllers/api/guildTechController.ts index 821831d4f..49d96b707 100644 --- a/src/controllers/api/guildTechController.ts +++ b/src/controllers/api/guildTechController.ts @@ -104,7 +104,7 @@ export const guildTechController: RequestHandler = async (req, res) => { ) { throw new Error(`unexpected TechProductCategory: ${data.TechProductCategory}`); } - if (!inventory[getSalvageCategory(data.TechProductCategory)].id(data.CategoryItemId)) { + if (!inventory[getSalvageCategory(data.TechProductCategory)].id(data.CategoryItemId!)) { throw new Error( `no item with id ${data.CategoryItemId} in ${getSalvageCategory(data.TechProductCategory)} array` ); diff --git a/src/controllers/api/setDojoComponentSettingsController.ts b/src/controllers/api/setDojoComponentSettingsController.ts index e7118415c..1286ba25f 100644 --- a/src/controllers/api/setDojoComponentSettingsController.ts +++ b/src/controllers/api/setDojoComponentSettingsController.ts @@ -13,7 +13,7 @@ export const setDojoComponentSettingsController: RequestHandler = async (req, re res.json({ DojoRequestStatus: -1 }); return; } - const component = guild.DojoComponents.id(req.query.componentId)!; + const component = guild.DojoComponents.id(req.query.componentId as string)!; const data = getJSONfromString(String(req.body)); component.Settings = data.Settings; await guild.save();