Skip to content

Commit

Permalink
Method name change for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
dima767 committed Dec 12, 2018
1 parent 8f4de87 commit edf035d
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ private User findUserOrThrowHttp404(String username) {

@Transactional
@PostMapping("/user")
ResponseEntity<?> saveUser(@RequestParam User user) {
ResponseEntity<?> saveOne(@RequestParam User user) {
Optional<User> persistedUser = userRepository.findByUsername(user.getUsername());
if (persistedUser.isPresent()) {
return ResponseEntity
Expand All @@ -89,7 +89,7 @@ ResponseEntity<?> saveUser(@RequestParam User user) {

@Transactional
@PutMapping("/user/{username}")
ResponseEntity<?> updateUser(@PathVariable(value = "username") String username, @RequestParam User user) {
ResponseEntity<?> updateOne(@PathVariable(value = "username") String username, @RequestParam User user) {
Optional<User> userSearchResult = userRepository.findByUsername(username);
if (!userSearchResult.isPresent()) {
return ResponseEntity.status(HttpStatus.BAD_REQUEST)
Expand Down

0 comments on commit edf035d

Please sign in to comment.