Skip to content

Commit 429c931

Browse files
committed
FUll Stack Backend
1 parent f51a311 commit 429c931

File tree

2 files changed

+8
-1
lines changed

2 files changed

+8
-1
lines changed

Part-9.SpringBoot-React-Projects/Project-2.SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/configure/SwaggerConfig.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public Docket postsApi() {
3838

3939
private ApiInfo metaData() {
4040
return new ApiInfoBuilder()
41-
.title("Spring Boot REST API with Swagger")
41+
.title("Full Stack: Spring Boot and React JS for the Shopping Mall")
4242
.description("\"Shopping Mall")
4343
.version("1.0.0")
4444
.license("Apache License Version 2.0")

Part-9.SpringBoot-React-Projects/Project-2.SpringBoot-React-ShoppingMall/fullstack/backend/src/main/java/com/urunov/controller/UserController.java

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,13 @@ public class UserController {
4343

4444
private static final Logger logger = LoggerFactory.getLogger(UserController.class);
4545

46+
// create employee rest api
47+
@PostMapping("/addUser")
48+
public User createEmployee(@RequestBody User user){
49+
return userRepository.save(user);
50+
}
51+
52+
4653
@GetMapping("/user/me")
4754
@PreAuthorize("hasRole('USER')")
4855
public UserSummary getCurrentUser(@CurrentUser UserPrincipal currentUser)

0 commit comments

Comments
 (0)