chore: address some questionable calls to DocumentArray.id
All checks were successful
Build Docker image / docker (push) Successful in 1m13s
Build / build (push) Successful in 1m47s

This commit is contained in:
Sainan 2025-05-09 07:18:25 +02:00
parent 0e255067a8
commit 7a51fab5d3
2 changed files with 2 additions and 2 deletions

View File

@ -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`
);

View File

@ -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<ISetDojoComponentSettingsRequest>(String(req.body));
component.Settings = data.Settings;
await guild.save();