File tree Expand file tree Collapse file tree
src/main/java/FortuneMonBackEnd/fortuneMon/controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change 33import FortuneMonBackEnd .fortuneMon .DTO .FortuneResponse ;
44import FortuneMonBackEnd .fortuneMon .apiPayload .ApiResponse ;
55import FortuneMonBackEnd .fortuneMon .service .FortuneService ;
6+ import io .swagger .v3 .oas .annotations .Operation ;
67import lombok .RequiredArgsConstructor ;
78import org .springframework .web .bind .annotation .GetMapping ;
89import org .springframework .web .bind .annotation .RestController ;
1415public class FortuneController {
1516 private final FortuneService fortuneService ;
1617
18+ @ Operation (summary = "오늘의 운세 조회" , description =
19+ "# 오늘의 운세 조회 API입니다. 로그인 후 진행하세요." )
1720 @ GetMapping ("/users/fortune" )
1821 public ApiResponse <?> getTodayFortune (){
1922 LocalDate today = LocalDate .now ();
Original file line number Diff line number Diff line change 44import FortuneMonBackEnd .fortuneMon .DTO .UserPokemonDTO ;
55import FortuneMonBackEnd .fortuneMon .config .security .SecurityUtil ;
66import FortuneMonBackEnd .fortuneMon .service .UserMonsterBallService ;
7+ import io .swagger .v3 .oas .annotations .Operation ;
78import lombok .RequiredArgsConstructor ;
89import org .springframework .data .repository .query .Param ;
910import org .springframework .web .bind .annotation .*;
1617public class UserMonsterBallController {
1718 private final UserMonsterBallService userMonsterBallService ;
1819
20+ @ Operation (summary = "유저가 가진 몬스터볼 개수 조회" , description =
21+ "# 유저 몬스터볼 조회 API입니다. 로그인 후 진행하세요." )
1922 @ GetMapping ("" )
2023 public List <UserMonsterBallResponseDTO > getUserMonsterBall (){
2124 Long userId = SecurityUtil .getCurrentUserId ();
2225
2326 return userMonsterBallService .getUserMonsterBall (userId );
2427 }
2528
29+ @ Operation (summary = "몬스터볼 오픈" , description =
30+ "# 몬스터볼을 오픈하는 API입니다. 로그인 후 진행하세요." )
2631 @ PostMapping ("/{id}/open" )
2732 public UserPokemonDTO openMonsterBall (@ PathVariable ("id" ) Long ballId ){
2833 return userMonsterBallService .openMonsterBall (ballId );
Original file line number Diff line number Diff line change 33import FortuneMonBackEnd .fortuneMon .DTO .UserPokemonDTO ;
44import FortuneMonBackEnd .fortuneMon .config .security .SecurityUtil ;
55import FortuneMonBackEnd .fortuneMon .service .UserPokemonServiceImpl ;
6+ import io .swagger .v3 .oas .annotations .Operation ;
67import lombok .RequiredArgsConstructor ;
78import org .springframework .web .bind .annotation .*;
89
@@ -16,12 +17,16 @@ public class UserPokemonController {
1617
1718 // 요청 받으면 Service 호출해서 유저가 보유한 포켓몬을 표시하여 반환함
1819 // 유저의 id를 받아서 id를 기준으로 유저의 포켓몬 정보를 가져온다
20+ @ Operation (summary = "유저 포켓몬 조회" , description =
21+ "# 유저 포켓몬 조회 API입니다. 로그인 후 진행하세요." )
1922 @ GetMapping ("/pokemons" )
2023 public List <UserPokemonDTO > getPokemonsWithOwnership (){
2124 Long userId = SecurityUtil .getCurrentUserId ();
2225 return userPokemonService .getUserPokemonsWithOwnership (userId );
2326 }
2427
28+ @ Operation (summary = "파트너 포켓몬 설정" , description =
29+ "# 파트너 포켓몬 설정 API입니다. 로그인 후 진행하세요." )
2530 @ PatchMapping ("/partners/{id}" )
2631 public UserPokemonDTO setPartnerPokemon (@ PathVariable ("id" ) Long pokemonId ){
2732 return userPokemonService .setPartnerPokemon (pokemonId );
You can’t perform that action at this time.
0 commit comments