diff --git a/src/controllers/model.controller.ts b/src/controllers/model.controller.ts index 1152d4a..464daf7 100644 --- a/src/controllers/model.controller.ts +++ b/src/controllers/model.controller.ts @@ -42,7 +42,7 @@ async function createModel(req: Request, res: Response): Promise { async function updateModel(req: Request, res: Response): Promise { const body: IDbModel = req.body; - const doesExist = await ModelService.getBySlug(`${body.slug_name}`); + const doesExist = await ModelService.getBySlug(`${req.params["modelSlug"]}`); if (!doesExist) { logger.error("Model does not exist"); return res.status(404).json({