In Laravel (php) has route /article/:article, and in controller method I get the model:
function getArticle(ArticleModel $article) {...}
How to make this in NestJS? My controller:
@Controller('/articles')
export class ArticlesController {
@Get('/:article/edit')
editArticle(@Param('article') articleId: number) {...}
}
How to transform @Param('article') to custom decorator @ArticleParam() which will return my Article entity by id in request?