chore: fix concat of ObjectId to make eslint happy

This commit is contained in:
Sainan 2024-12-29 06:00:51 +01:00
parent b0c3e725f8
commit 27af54d039
2 changed files with 4 additions and 4 deletions

View File

@ -38,8 +38,8 @@ export const claimCompletedRecipeController: RequestHandler = async (req, res) =
const recipe = getRecipe(pendingRecipe.ItemType); const recipe = getRecipe(pendingRecipe.ItemType);
if (!recipe) { if (!recipe) {
logger.error(`no completed item found for recipe ${pendingRecipe._id}`); logger.error(`no completed item found for recipe ${pendingRecipe._id.toString()}`);
throw new Error(`no completed item found for recipe ${pendingRecipe._id}`); throw new Error(`no completed item found for recipe ${pendingRecipe._id.toString()}`);
} }
if (req.query.cancel) { if (req.query.cancel) {

View File

@ -26,8 +26,8 @@ export const getShip = async (shipId: Types.ObjectId, fieldSelection: string = "
const ship = await Ship.findOne({ _id: shipId }, fieldSelection); const ship = await Ship.findOne({ _id: shipId }, fieldSelection);
if (!ship) { if (!ship) {
logger.error(`error finding a ship with id ${shipId}`); logger.error(`error finding a ship with id ${shipId.toString()}`);
throw new Error(`error finding a ship with id ${shipId}`); throw new Error(`error finding a ship with id ${shipId.toString()}`);
} }
return ship; return ship;