chore: address some questionable calls to DocumentArray.id
This commit is contained in:
parent
0e255067a8
commit
7a51fab5d3
@ -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`
|
||||
);
|
||||
|
@ -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();
|
||||
|
Loading…
x
Reference in New Issue
Block a user