|
@@ -64,6 +64,7 @@ public class AccountResource {
|
64
|
64
|
}
|
65
|
65
|
User user = userService.registerUser(managedUserVM, managedUserVM.getPassword());
|
66
|
66
|
mailService.sendActivationEmail(user);
|
|
67
|
+ System.out.println("1");
|
67
|
68
|
}
|
68
|
69
|
|
69
|
70
|
/**
|
|
@@ -79,7 +80,6 @@ public class AccountResource {
|
79
|
80
|
if (!user.isPresent()) {
|
80
|
81
|
throw new InternalServerErrorException("No user was found for this activation key");
|
81
|
82
|
}
|
82
|
|
- //consider adding profile and account details here
|
83
|
83
|
}
|
84
|
84
|
|
85
|
85
|
/**
|
|
@@ -92,6 +92,7 @@ public class AccountResource {
|
92
|
92
|
@Timed
|
93
|
93
|
public String isAuthenticated(HttpServletRequest request) {
|
94
|
94
|
log.debug("REST request to check if the current user is authenticated");
|
|
95
|
+ System.out.println("3");
|
95
|
96
|
return request.getRemoteUser();
|
96
|
97
|
}
|
97
|
98
|
|
|
@@ -104,6 +105,7 @@ public class AccountResource {
|
104
|
105
|
@GetMapping("/account")
|
105
|
106
|
@Timed
|
106
|
107
|
public UserDTO getAccount() {
|
|
108
|
+ System.out.println("4");
|
107
|
109
|
return userService.getUserWithAuthorities()
|
108
|
110
|
.map(UserDTO::new)
|
109
|
111
|
.orElseThrow(() -> new InternalServerErrorException("User could not be found"));
|
|
@@ -128,7 +130,6 @@ public class AccountResource {
|
128
|
130
|
if (!user.isPresent()) {
|
129
|
131
|
throw new InternalServerErrorException("User could not be found");
|
130
|
132
|
}
|
131
|
|
-
|
132
|
133
|
userService.updateUser(userDTO.getFirstName(), userDTO.getLastName(), userDTO.getEmail(), userDTO.getLangKey(), userDTO.getImageUrl());
|
133
|
134
|
}
|
134
|
135
|
|