Skip to content

Commit

Permalink
Merge pull request #244 from kakao-tech-campus-2nd-step3/docs/#185-re…
Browse files Browse the repository at this point in the history
…adme

[fix] user 변경
  • Loading branch information
suhyeon7497 authored Nov 15, 2024
2 parents 4c96693 + 54a0e2a commit 18e2748
Showing 1 changed file with 5 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PatchMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import team7.inplace.user.application.UserFacade;
import team7.inplace.user.application.UserService;
Expand All @@ -20,21 +19,20 @@

@RestController
@RequiredArgsConstructor
@RequestMapping("/users")
public class UserController implements UserControllerApiSepc {

public final UserService userService;
public final UserFacade userFacade;

@PatchMapping("/nickname")
@PatchMapping("/user/nickname")
public ResponseEntity<Void> updateNickname(
@PathVariable("nickname") String nickname
) {
userService.updateNickname(nickname);
return new ResponseEntity<>(HttpStatus.OK);
}

@GetMapping("/influencers")
@GetMapping("/users/influencers")
public ResponseEntity<Page<LikedInfluencerResponse>> getMyFavoriteInfluencers(
@PageableDefault(page = 0, size = 10) Pageable pageable
) {
Expand All @@ -43,7 +41,7 @@ public ResponseEntity<Page<LikedInfluencerResponse>> getMyFavoriteInfluencers(
return new ResponseEntity<>(influencers, HttpStatus.OK);
}

@GetMapping("/places")
@GetMapping("/users/places")
public ResponseEntity<Page<LikedPlaceResponse>> getMyFavoritePlaces(
@PageableDefault(page = 0, size = 10) Pageable pageable
) {
Expand All @@ -52,7 +50,7 @@ public ResponseEntity<Page<LikedPlaceResponse>> getMyFavoritePlaces(
return new ResponseEntity<>(places, HttpStatus.OK);
}

@GetMapping("/reviews")
@GetMapping("/users/reviews")
public ResponseEntity<Page<MyReviewResponse>> getMyReviews(
@PageableDefault(page = 0, size = 10) Pageable pageable
) {
Expand All @@ -61,7 +59,7 @@ public ResponseEntity<Page<MyReviewResponse>> getMyReviews(
return new ResponseEntity<>(reviews, HttpStatus.OK);
}

@GetMapping("/info")
@GetMapping("/users/info")
public ResponseEntity<UserInfoResponse> getUserInfo() {
UserInfoResponse response = UserInfoResponse.from(userService.getUserInfo());

Expand Down

0 comments on commit 18e2748

Please sign in to comment.