返回提交历史
Modified
src/controllers/api/startRecipeController.ts
+1
-1
XFEstudio/SpaceNinjaServer
fix: ignore client providing not-an-id in recipe ids array (#1990)
Closes #1989 Reviewed-on: https://onlyg.it/OpenWF/SpaceNinjaServer/pulls/1990 Co-authored-by: Sainan <63328889+Sainan@users.noreply.github.com> Co-committed-by: Sainan <63328889+Sainan@users.noreply.github.com>
f6cbc02c
代码差异
1 个文件
+1
-1
@@ -41,7 +41,7 @@ export const startRecipeController: RequestHandler = async (req, res) => {
41
41
];
42
42
43
43
for (let i = 0; i != recipe.ingredients.length; ++i) {
44
if (startRecipeRequest.Ids[i]) {
44
if (startRecipeRequest.Ids[i] && startRecipeRequest.Ids[i][0] != "/") {
45
45
const category = ExportWeapons[recipe.ingredients[i].ItemType].productCategory;
46
46
if (category != "LongGuns" && category != "Pistols" && category != "Melee") {
47
47
throw new Error(`unexpected equipment ingredient type: ${category}`);