88import com .back .web7_9_codecrete_be .domain .artists .dto .response .SearchResponse ;
99import com .back .web7_9_codecrete_be .domain .artists .service .ArtistService ;
1010import com .back .web7_9_codecrete_be .domain .artists .service .ArtistEnrichService ;
11+ import com .back .web7_9_codecrete_be .domain .users .entity .User ;
12+ import com .back .web7_9_codecrete_be .global .rq .Rq ;
1113import com .back .web7_9_codecrete_be .global .rsData .RsData ;
1214import io .swagger .v3 .oas .annotations .Operation ;
1315import io .swagger .v3 .oas .annotations .tags .Tag ;
2426public class ArtistsController {
2527 private final ArtistService artistService ;
2628 private final ArtistEnrichService enrichService ;
29+ private final Rq rq ;
2730
2831 @ Operation (summary = "아티스트 저장" , description = "임의의 가수(or 팀)을 DB에 저장합니다." )
2932 @ GetMapping ("/saved" )
@@ -97,7 +100,8 @@ public RsData<List<SearchResponse>> search(
97100 public RsData <Void > artistLikes (
98101 @ PathVariable Long id
99102 ) {
100- artistService .likeArtist (id );
103+ User user = rq .getUser ();
104+ artistService .likeArtist (id , user );
101105 return RsData .success ("아티스트 찜 성공" , null );
102106 }
103107
@@ -106,7 +110,8 @@ public RsData<Void> artistLikes(
106110 public RsData <Void > deleteArtistLikes (
107111 @ PathVariable Long id
108112 ) {
109- artistService .deleteLikeArtist (id );
113+ User user = rq .getUser ();
114+ artistService .deleteLikeArtist (id , user );
110115 return RsData .success ("아티스트 찜 해제 성공" , null );
111116 }
112117
0 commit comments