@@ -122,8 +122,11 @@ export class ProductReviewController {
122
122
},
123
123
},
124
124
})
125
- async findById(@param.path.number('id') id: number): Promise<ProductReview> {
126
- return this.barRepository.findById(id);
125
+ async findById(
126
+ @param.path.number('id') id: number,
127
+ @param.query.object('filter', getFilterSchemaFor(ProductReview)) filter?: Filter<ProductReview>
128
+ ): Promise<ProductReview> {
129
+ return this.barRepository.findById(id, filter);
127
130
}
128
131
129
132
@patch('/product-reviews/{id}', {
@@ -219,7 +222,7 @@ export class ProductReviewController {
219
222
'application/json': {
220
223
schema: getModelSchemaRef(ProductReview, {
221
224
title: 'NewProductReview',
222
-
225
+
223
226
}),
224
227
},
225
228
},
@@ -291,8 +294,11 @@ export class ProductReviewController {
291
294
},
292
295
},
293
296
})
294
- async findById(@param.path.number('id') id: number): Promise<ProductReview> {
295
- return this.barRepository.findById(id);
297
+ async findById(
298
+ @param.path.number('id') id: number,
299
+ @param.query.object('filter', getFilterSchemaFor(ProductReview)) filter?: Filter<ProductReview>
300
+ ): Promise<ProductReview> {
301
+ return this.barRepository.findById(id, filter);
296
302
}
297
303
298
304
@patch('/product-reviews/{id}', {
0 commit comments