We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1094509 commit 9791350Copy full SHA for 9791350
packages/cli/generators/controller/templates/src/controllers/controller-rest-template.ts.ejs
@@ -112,8 +112,11 @@ export class <%= className %>Controller {
112
},
113
114
})
115
- async findById(@param.path.<%= idType %>('id') id: <%= idType %>): Promise<<%= modelName %>> {
116
- return this.<%= repositoryNameCamel %>.findById(id);
+ async findById(
+ @param.path.<%= idType %>('id') id: <%= idType %>,
117
+ @param.query.object('filter', getFilterSchemaFor(<%= modelName %>)) filter?: Filter<<%= modelName %>>
118
+ ): Promise<<%= modelName %>> {
119
+ return this.<%= repositoryNameCamel %>.findById(id, filter);
120
}
121
122
@patch('<%= httpPathName %>/{id}', {
0 commit comments