Skip to content

Commit 292e2c1

Browse files
Update UserRestControler
1 parent df54016 commit 292e2c1

File tree

1 file changed

+23
-0
lines changed

1 file changed

+23
-0
lines changed

backend/webandtech/src/main/java/webapp8/webandtech/controller/api/users/UserRestControler.java

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,29 @@
1212
@CrossOrigin
1313
@RequestMapping("api/users")
1414
public class UserRestControler {
15+
16+
@Autowired
17+
private UserService userService;
18+
19+
@Autowired
20+
private ProductService productsService;
21+
22+
@Operation(summary = "Get a all users")
23+
@ApiResponses(value = {
24+
@ApiResponse(
25+
responseCode = "200",
26+
description = "Found the Users",
27+
content = {@Content(
28+
mediaType = "application/json"
29+
)}
30+
)
31+
})
32+
@JsonView(Users.Detailed.class)
33+
@GetMapping("/")
34+
public List<Users> getAllUsers(){
35+
return userService.getAll();
36+
}
1537

1638

1739
}
40+

0 commit comments

Comments
 (0)