diff --git a/src/lib/routes/admin-api/strategy.ts b/src/lib/routes/admin-api/strategy.ts index 16c6489e40..d49958612b 100644 --- a/src/lib/routes/admin-api/strategy.ts +++ b/src/lib/routes/admin-api/strategy.ts @@ -138,7 +138,7 @@ class StrategyController extends Controller { this.route({ method: 'put', - path: '/:strategyName', + path: '/:name', handler: this.updateStrategy, permission: UPDATE_STRATEGY, middleware: [ @@ -257,13 +257,13 @@ class StrategyController extends Controller { } async updateStrategy( - req: IAuthRequest<{ strategyName: string }, UpdateStrategySchema>, + req: IAuthRequest<{ name: string }, UpdateStrategySchema>, res: Response, ): Promise { const userName = extractUsername(req); await this.strategyService.updateStrategy( - { ...req.body, name: req.params.strategyName }, + { ...req.body, name: req.params.name }, userName, ); res.status(200).end();