返回提交历史
Modified
src/controllers/api/claimCompletedRecipeController.ts
+2
-2
Modified
src/services/shipService.ts
+2
-2
XFEstudio/SpaceNinjaServer
chore: fix concat of ObjectId to make eslint happy
27af54d0
代码差异
2 个文件
+4
-4
@@ -38,8 +38,8 @@ export const claimCompletedRecipeController: RequestHandler = async (req, res) =
38
38
39
39
const recipe = getRecipe(pendingRecipe.ItemType);
40
40
if (!recipe) {
41
logger.error(`no completed item found for recipe ${pendingRecipe._id}`);
42
throw new Error(`no completed item found for recipe ${pendingRecipe._id}`);
41
logger.error(`no completed item found for recipe ${pendingRecipe._id.toString()}`);
42
throw new Error(`no completed item found for recipe ${pendingRecipe._id.toString()}`);
43
43
}
44
44
45
45
if (req.query.cancel) {
@@ -26,8 +26,8 @@ export const getShip = async (shipId: Types.ObjectId, fieldSelection: string = "
26
26
const ship = await Ship.findOne({ _id: shipId }, fieldSelection);
27
27
28
28
if (!ship) {
29
logger.error(`error finding a ship with id ${shipId}`);
30
throw new Error(`error finding a ship with id ${shipId}`);
29
logger.error(`error finding a ship with id ${shipId.toString()}`);
30
throw new Error(`error finding a ship with id ${shipId.toString()}`);
31
31
}
32
32
33
33
return ship;