File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
src/main/java/com/answerdigital/answerking/controller Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -58,9 +58,8 @@ public ResponseEntity<List<Product>> getAllProducts() {
5858 content = { @ Content (mediaType = "application/json" , schema = @ Schema (implementation = ErrorResponse .class )) })
5959 })
6060 @ GetMapping (path = "/{id}" )
61- public ResponseEntity <Product > getProductById (@ Valid @ PathVariable @ NotNull final Long id , final Errors errors ) {
62- return new ResponseEntity <>(productService .findById (id ),
63- errors .hasErrors () ? HttpStatus .NOT_FOUND : HttpStatus .OK );
61+ public ResponseEntity <Product > getProductById (@ Valid @ PathVariable @ NotNull final Long id ) {
62+ return new ResponseEntity <>(productService .findById (id ), HttpStatus .OK );
6463 }
6564
6665 @ Operation (summary = "Create a new product." )
You can’t perform that action at this time.
0 commit comments