diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/controller/ArtistsController.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/controller/ArtistsController.java index b0432528..ba8b3342 100644 --- a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/controller/ArtistsController.java +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/controller/ArtistsController.java @@ -1,14 +1,17 @@ package com.back.web7_9_codecrete_be.domain.artists.controller; import com.back.web7_9_codecrete_be.domain.artists.dto.request.CreateRequest; +import com.back.web7_9_codecrete_be.domain.artists.dto.request.SearchRequest; import com.back.web7_9_codecrete_be.domain.artists.dto.request.UpdateRequest; import com.back.web7_9_codecrete_be.domain.artists.dto.response.ArtistListResponse; import com.back.web7_9_codecrete_be.domain.artists.dto.response.ArtistDetailResponse; +import com.back.web7_9_codecrete_be.domain.artists.dto.response.SearchResponse; import com.back.web7_9_codecrete_be.domain.artists.service.ArtistService; import com.back.web7_9_codecrete_be.domain.artists.service.ArtistEnrichService; import com.back.web7_9_codecrete_be.global.rsData.RsData; import io.swagger.v3.oas.annotations.Operation; import io.swagger.v3.oas.annotations.tags.Tag; +import jakarta.validation.Valid; import lombok.RequiredArgsConstructor; import org.springframework.web.bind.annotation.*; @@ -22,7 +25,7 @@ public class ArtistsController { private final ArtistService artistService; private final ArtistEnrichService enrichService; - @Operation(summary = "아티스트 저장", description = "임의의 가수 300명(or 팀)을 DB에 저장합니다.") + @Operation(summary = "아티스트 저장", description = "임의의 가수(or 팀)을 DB에 저장합니다.") @GetMapping("/saved") public RsData saveArtist() { int saved = artistService.setArtist(); @@ -43,7 +46,7 @@ public RsData enrich( public RsData create( @RequestBody CreateRequest reqBody ) { - artistService.createArtist(reqBody.artistName(), reqBody.artistGroup(), reqBody.artistGroup(), reqBody.genreName()); + artistService.createArtist(reqBody.artistName(), reqBody.artistGroup(), reqBody.artistType(), reqBody.genreName()); return RsData.success("아티스트 생성이 완료되었습니다.", null); } @@ -79,4 +82,54 @@ public RsData delete( artistService.delete(id); return RsData.success("아티스트 정보를 삭제했습니다.", null); } + + @Operation(summary = "아티스트 검색", + description = "아티스트 이름 또는 키워드를 입력하면, 해당 키워드가 포함된 아티스트 목록 또는 이름에 해당하는 아티스트를 조회합니다.") + @PostMapping("/search") + public RsData> search( + @Valid @RequestBody SearchRequest reqBody + ) { + return RsData.success("아티스트 검색에 성공했습니다.", artistService.search(reqBody.artistName())); + } + + @Operation(summary = "아티스트 찜하기", description = "id 에 해당하는 특정 아티스트를 찜합니다.") + @PostMapping("/likes/{id}") + public void artistLikes( + @PathVariable Long id + ) {} + + @Operation(summary = "아티스트 찜 해체", description = "id 에 해당하는 아티스트에게 등록했던 찜을 해제합니다.") + @DeleteMapping("/likes/{id}") + public void deleteArtistLikes( + @PathVariable Long id + ) {} + + @Operation(summary = "개인화된 공연 리스트 생성", description = "유저가 찜한 아티스트를 기반으로 공연 리스트를 생성합니다.") + @PostMapping("/list") + public void concertList() {} + + @Operation(summary = "아티스트 인기 순위", description = "Spotify 인기도를 바탕으로 아티스트 인기 순위 랭킹을 제공합니다.") + @GetMapping("/ranking") + public void artistRanking() {} + + @Operation(summary = "장르 기반 아티스트 추천", description = "찜한 장르를 기반으로 아티스트 추천 리스트를 제공합니다.") + @GetMapping("/recommendation/{genreId}") + public void recommendArtist( + @PathVariable Long genreId + ) {} + + @Operation(summary = "공연 셋리스트 생성", description = "사용자가 공연 셋리스트를 생성합니다.") + @PostMapping("/setlist/{concertId}/{artistId}") + public void makeSetlist( + @PathVariable Long concertId, + @PathVariable Long artistId + ) {} + + @Operation(summary = "공연 셋리스트 조회", description = "다른 사용자들이 생성한 셋리스트를 조회합니다.") + @GetMapping("/setlist/{concertId}/{artistId}") + public void getSetlist( + @PathVariable Long concertId, + @PathVariable Long artistId + ) {} } + diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/CreateRequest.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/CreateRequest.java index 4fef288d..e2333605 100644 --- a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/CreateRequest.java +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/CreateRequest.java @@ -1,9 +1,22 @@ package com.back.web7_9_codecrete_be.domain.artists.dto.request; +import com.back.web7_9_codecrete_be.domain.artists.entity.ArtistType; +import jakarta.validation.constraints.NotNull; +import jakarta.validation.constraints.Size; + public record CreateRequest( + @NotNull(message = "아티스트 이름은 필수로 입력해야합니다.") + @Size(max = 200, message = "아티스트 이름은 200자를 넘길 수 없습니다.") String artistName, + + @Size(max = 150, message = "아티스트 그룹 이름은 150자를 넘길 수 없습니다.") String artistGroup, - String artistType, + + @NotNull(message = "아티스트 타입은 필수로 입력해야합니다(SOLO or GROUP)") + ArtistType artistType, + + @NotNull(message = "장르는 필수로 입력해야합니다.") + @Size(max = 30, message = "장르는 30자를 넘길 수 없습니다.") String genreName ) { } diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/SearchRequest.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/SearchRequest.java new file mode 100644 index 00000000..9564f0a0 --- /dev/null +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/SearchRequest.java @@ -0,0 +1,9 @@ +package com.back.web7_9_codecrete_be.domain.artists.dto.request; + +import jakarta.validation.constraints.NotBlank; + +public record SearchRequest( + @NotBlank(message = "검색어를 입력해주세요") + String artistName +) { +} diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/UpdateRequest.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/UpdateRequest.java index 6e43712f..231ced72 100644 --- a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/UpdateRequest.java +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/request/UpdateRequest.java @@ -1,9 +1,18 @@ package com.back.web7_9_codecrete_be.domain.artists.dto.request; +import com.back.web7_9_codecrete_be.domain.artists.entity.ArtistType; +import jakarta.validation.constraints.Size; + public record UpdateRequest( + @Size(max = 200, message = "아티스트 이름은 200자를 넘길 수 없습니다.") String artistName, + + @Size(max = 150, message = "아티스트 그룹 이름은 150자를 넘길 수 없습니다.") String artistGroup, - String artistType, + + ArtistType artistType, + + @Size(max = 30, message = "장르 이름은 30자를 넘길 수 없습니다.") String genreName ) { } diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/response/ArtistDetailResponse.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/response/ArtistDetailResponse.java index 91ed37d8..d18f8baa 100644 --- a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/response/ArtistDetailResponse.java +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/response/ArtistDetailResponse.java @@ -1,11 +1,13 @@ package com.back.web7_9_codecrete_be.domain.artists.dto.response; +import com.back.web7_9_codecrete_be.domain.artists.entity.ArtistType; + import java.util.List; public record ArtistDetailResponse( String artistName, String artistGroup, - String artistType, + ArtistType artistType, String profileImageUrl, long likeCount, int totalAlbums, diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/response/SearchResponse.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/response/SearchResponse.java new file mode 100644 index 00000000..00f1bcf9 --- /dev/null +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/dto/response/SearchResponse.java @@ -0,0 +1,17 @@ +package com.back.web7_9_codecrete_be.domain.artists.dto.response; + +import com.back.web7_9_codecrete_be.domain.artists.entity.Artist; + +public record SearchResponse( + String artistName, + String artistGroup, + int likeCount +) { + public static SearchResponse from(Artist artist) { + return new SearchResponse( + artist.getArtistName(), + artist.getArtistGroup(), + artist.getLikeCount() + ); + } +} diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/entity/Artist.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/entity/Artist.java index 23db1cc3..8e480ed3 100644 --- a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/entity/Artist.java +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/entity/Artist.java @@ -24,8 +24,9 @@ public class Artist { @Column(name = "artist_group") private String artistGroup; + @Enumerated(EnumType.STRING) @Column(name = "artist_type") - private String artistType; + private ArtistType artistType; @ManyToOne(fetch = FetchType.LAZY) private Genre genre; @@ -36,7 +37,10 @@ public class Artist { @Column(name = "name_ko", length = 200) private String nameKo; - public Artist(String spotifyArtistId, String artistName, String artistGroup, String artistType, Genre genre) { + @Column(name = "like_count", nullable = false) + private int likeCount = 0; + + public Artist(String spotifyArtistId, String artistName, String artistGroup, ArtistType artistType, Genre genre) { this.spotifyArtistId = spotifyArtistId; this.artistName = artistName; this.artistGroup = artistGroup; // 옵션 B: seed에서는 null @@ -44,14 +48,14 @@ public Artist(String spotifyArtistId, String artistName, String artistGroup, Str this.genre = genre; } - public Artist(String artistName, String artistGroup, String artistType, Genre genre) { + public Artist(String artistName, String artistGroup, ArtistType artistType, Genre genre) { this.artistName = artistName; this.artistGroup = artistGroup; this.artistType = artistType; this.genre = genre; } - public void updateProfile(String nameKo, String artistGroup, String artistType) { + public void updateProfile(String nameKo, String artistGroup, ArtistType artistType) { this.nameKo = nameKo; this.artistGroup = artistGroup; // nullable this.artistType = artistType; // "SOLO" / "GROUP" @@ -65,7 +69,7 @@ public void changeGroup(String group) { this.artistGroup = group; } - public void changeType(String type) { + public void changeType(ArtistType type) { this.artistType = type; } diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/entity/ArtistType.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/entity/ArtistType.java new file mode 100644 index 00000000..e05c0e83 --- /dev/null +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/entity/ArtistType.java @@ -0,0 +1,6 @@ +package com.back.web7_9_codecrete_be.domain.artists.entity; + +public enum ArtistType { + SOLO, + GROUP +} diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/repository/ArtistRepository.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/repository/ArtistRepository.java index e749f665..96ad9568 100644 --- a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/repository/ArtistRepository.java +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/repository/ArtistRepository.java @@ -7,7 +7,6 @@ import org.springframework.stereotype.Repository; import java.util.List; -import java.util.Optional; @Repository public interface ArtistRepository extends JpaRepository { @@ -21,4 +20,6 @@ public interface ArtistRepository extends JpaRepository { List findTop5ByArtistGroupAndIdNot(String artistGroup, long excludeId); List findTop5ByGenreIdAndIdNot(Long genreId, long excludeId); + + List findAllByArtistNameContainingIgnoreCaseOrNameKoContainingIgnoreCase(String artistName1, String artistName2); } diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/ArtistEnrichService.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/ArtistEnrichService.java index 8cdc4d04..ae4273d1 100644 --- a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/ArtistEnrichService.java +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/ArtistEnrichService.java @@ -1,6 +1,7 @@ package com.back.web7_9_codecrete_be.domain.artists.service; import com.back.web7_9_codecrete_be.domain.artists.entity.Artist; +import com.back.web7_9_codecrete_be.domain.artists.entity.ArtistType; import com.back.web7_9_codecrete_be.domain.artists.repository.ArtistRepository; import com.back.web7_9_codecrete_be.global.musicbrainz.MusicBrainzClient; import com.back.web7_9_codecrete_be.global.wikidata.WikidataClient; @@ -95,13 +96,28 @@ protected void enrichSingleArtist(Artist artist) { } // 기존 artistType이 있으면 유지, 없으면 가져온 값 사용 - String artistType = result.artistType != null ? result.artistType : artist.getArtistType(); + String artistTypeStr = result.artistType != null ? result.artistType : + (artist.getArtistType() != null ? artist.getArtistType().name() : null); + + // String을 ArtistType enum으로 변환 + ArtistType artistType; + if (artistTypeStr != null) { + try { + artistType = ArtistType.valueOf(artistTypeStr); + } catch (IllegalArgumentException e) { + log.warn("잘못된 artistType 값: {}, 기본값 SOLO 사용", artistTypeStr); + artistType = ArtistType.SOLO; + } + } else { + // 기존 값이 없고 새 값도 없으면 기본값 사용 + artistType = artist.getArtistType() != null ? artist.getArtistType() : ArtistType.SOLO; + } - // ✅ 기존 row를 "보강" + // 기존 row를 "보강" artist.updateProfile(result.nameKo, result.artistGroup, artistType); // 명시적으로 save하여 변경사항을 DB에 즉시 반영 artistRepository.save(artist); - log.info("✅ Enrich 성공: artistId={}, name={}, nameKo={}, group={}, type={}, source={}", + log.info("Enrich 성공: artistId={}, name={}, nameKo={}, group={}, type={}, source={}", artist.getId(), artist.getArtistName(), result.nameKo, result.artistGroup, artistType, result.source); } diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/ArtistService.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/ArtistService.java index ecda161a..4a1d46cf 100644 --- a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/ArtistService.java +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/ArtistService.java @@ -3,7 +3,9 @@ import com.back.web7_9_codecrete_be.domain.artists.dto.request.UpdateRequest; import com.back.web7_9_codecrete_be.domain.artists.dto.response.ArtistListResponse; import com.back.web7_9_codecrete_be.domain.artists.dto.response.ArtistDetailResponse; +import com.back.web7_9_codecrete_be.domain.artists.dto.response.SearchResponse; import com.back.web7_9_codecrete_be.domain.artists.entity.Artist; +import com.back.web7_9_codecrete_be.domain.artists.entity.ArtistType; import com.back.web7_9_codecrete_be.domain.artists.entity.Genre; import com.back.web7_9_codecrete_be.domain.artists.repository.ArtistRepository; import com.back.web7_9_codecrete_be.domain.artists.repository.ArtistLikeRepository; @@ -30,7 +32,7 @@ public int setArtist() { } @Transactional - public Artist createArtist(String artistName, String artistGroup, String artistType, String genreName) { + public Artist createArtist(String artistName, String artistGroup, ArtistType artistType, String genreName) { Genre genre = genreService.findByGenreName(genreName); if(artistRepository.existsByArtistName(artistName) || artistRepository.existsByNameKo(artistName)) { throw new BusinessException(ArtistErrorCode.ARTIST_ALREADY_EXISTS); @@ -85,8 +87,8 @@ public void updateArtist(Long id, UpdateRequest req) { changed = true; } - if (req.artistType() != null && !req.artistType().isBlank()) { - artist.changeType(req.artistType().trim()); + if (req.artistType() != null) { + artist.changeType(req.artistType()); changed = true; } @@ -97,7 +99,7 @@ public void updateArtist(Long id, UpdateRequest req) { } if (!changed) { - throw new BusinessException(ArtistErrorCode.INVALID_UPDATE_REQUEST); // "수정할 값이 없습니다" + throw new BusinessException(ArtistErrorCode.INVALID_UPDATE_REQUEST); } } @@ -108,4 +110,19 @@ public void delete(Long id) { artistRepository.delete(artist); } + @Transactional + public List search(String artistName) { + + List artists = + artistRepository.findAllByArtistNameContainingIgnoreCaseOrNameKoContainingIgnoreCase(artistName, artistName); + + if (artists.isEmpty()) { + throw new BusinessException(ArtistErrorCode.ARTIST_NOT_FOUND); + } + + return artists.stream() + .map(SearchResponse::from) + .toList(); + } + } diff --git a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/SpotifyService.java b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/SpotifyService.java index b80b455c..58c02b70 100644 --- a/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/SpotifyService.java +++ b/src/main/java/com/back/web7_9_codecrete_be/domain/artists/service/SpotifyService.java @@ -4,6 +4,8 @@ import com.back.web7_9_codecrete_be.domain.artists.dto.response.ArtistDetailResponse; import com.back.web7_9_codecrete_be.domain.artists.dto.response.RelatedArtistResponse; import com.back.web7_9_codecrete_be.domain.artists.dto.response.TopTrackResponse; +import com.back.web7_9_codecrete_be.domain.artists.entity.Artist; +import com.back.web7_9_codecrete_be.domain.artists.entity.ArtistType; import com.back.web7_9_codecrete_be.domain.artists.entity.Genre; import com.back.web7_9_codecrete_be.domain.artists.repository.ArtistRepository; import com.back.web7_9_codecrete_be.domain.artists.repository.GenreRepository; @@ -19,7 +21,6 @@ import se.michaelthelin.spotify.enums.AlbumType; import se.michaelthelin.spotify.exceptions.detailed.NotFoundException; import se.michaelthelin.spotify.model_objects.specification.AlbumSimplified; -import se.michaelthelin.spotify.model_objects.specification.Artist; import se.michaelthelin.spotify.model_objects.specification.Image; import se.michaelthelin.spotify.model_objects.specification.Paging; import se.michaelthelin.spotify.model_objects.specification.Track; @@ -63,7 +64,7 @@ public int seedKoreanArtists300() { int offset = 0; while (totalSaved < targetCount) { - Paging paging = api.searchArtists(q) + Paging paging = api.searchArtists(q) .limit(limit) .offset(offset) .build() @@ -85,10 +86,10 @@ public int seedKoreanArtists300() { String mainGenreName = pickMainGenreName(spotifyArtist); Genre genre = findOrCreateGenreByName(mainGenreName, null); - String artistType = inferArtistType(spotifyArtist); + String artistTypeStr = inferArtistType(spotifyArtist); + ArtistType artistType = ArtistType.valueOf(artistTypeStr); - com.back.web7_9_codecrete_be.domain.artists.entity.Artist artistEntity = - new com.back.web7_9_codecrete_be.domain.artists.entity.Artist( + Artist artistEntity = new Artist( spotifyId, name.trim(), null, // artistGroup @@ -127,7 +128,7 @@ public int seedKoreanArtists300() { "korean indie", "korean rock" ); - private boolean isLikelyKoreanMusic(Artist a) { + private boolean isLikelyKoreanMusic(se.michaelthelin.spotify.model_objects.specification.Artist a) { String[] genres = a.getGenres(); if (genres != null) { for (String g : genres) { @@ -142,7 +143,7 @@ private boolean isLikelyKoreanMusic(Artist a) { return name != null && name.matches(".*[가-힣].*"); } - private String pickMainGenreName(Artist a) { + private String pickMainGenreName(se.michaelthelin.spotify.model_objects.specification.Artist a) { String[] genres = a.getGenres(); if (genres == null || genres.length == 0) return "k-pop"; @@ -161,7 +162,7 @@ private String pickMainGenreName(Artist a) { return "k-pop"; } - private String inferArtistType(Artist a) { + private String inferArtistType(se.michaelthelin.spotify.model_objects.specification.Artist a) { String[] genres = a.getGenres(); if (genres != null) { for (String g : genres) { @@ -182,7 +183,7 @@ private Genre findOrCreateGenreByName(String genreName, String genreGroup) { public ArtistDetailResponse getArtistDetail( String spotifyArtistId, String artistGroup, - String artistType, + ArtistType artistType, long likeCount, long artistId, Long genreId @@ -190,7 +191,7 @@ public ArtistDetailResponse getArtistDetail( try { SpotifyApi api = spotifyClient.getAuthorizedApi(); - Artist artist = api.getArtist(spotifyArtistId).build().execute(); // 메인 정보는 실패 시 예외 발생 + se.michaelthelin.spotify.model_objects.specification.Artist artist = api.getArtist(spotifyArtistId).build().execute(); // 메인 정보는 실패 시 예외 발생 Track[] topTracks = safeGetTopTracks(api, spotifyArtistId); Paging albums = safeGetAlbums(api, spotifyArtistId); @@ -210,8 +211,8 @@ public ArtistDetailResponse getArtistDetail( pickImageUrl(artist.getImages()), likeCount, albums != null ? albums.getTotal() : 0, - artist.getPopularity(), // (너가 별점으로 바꾸고 싶으면 여기 가공) - "", // Spotify에서는 설명을 제공하지 않아 공란 처리 + artist.getPopularity(), // 별점으로 수정 + "", // 설명 toAlbumResponses(albums != null ? albums.getItems() : null, spotifyArtistId), toTopTrackResponses(topTracks), relatedResponses @@ -252,14 +253,9 @@ private Paging safeGetAlbums(SpotifyApi api, String artistId) { } } - /** - * ✅ related artists - * - 정상 호출 - * - related가 비거나 404면 fallback(장르 기반 검색)으로 대체 - */ private List safeGetRelated( SpotifyApi api, - Artist me, + se.michaelthelin.spotify.model_objects.specification.Artist me, String artistGroup, long artistId, Long genreId @@ -271,7 +267,7 @@ private List safeGetRelated( } try { - Artist[] related = api.getArtistsRelatedArtists(id).build().execute(); + se.michaelthelin.spotify.model_objects.specification.Artist[] related = api.getArtistsRelatedArtists(id).build().execute(); if (related != null && related.length > 0) { log.info("Spotify related artists fetched: size={} spotifyArtistId={}", related.length, id); return toRelatedArtistResponses(related); @@ -365,7 +361,7 @@ private List toTopTrackResponses(Track[] tracks) { .collect(toList()); } - private List toRelatedArtistResponses(Artist[] artists) { + private List toRelatedArtistResponses(se.michaelthelin.spotify.model_objects.specification.Artist[] artists) { if (artists == null) return List.of(); return Stream.of(artists) .filter(Objects::nonNull) diff --git a/src/main/java/com/back/web7_9_codecrete_be/global/error/code/ArtistErrorCode.java b/src/main/java/com/back/web7_9_codecrete_be/global/error/code/ArtistErrorCode.java index d8078183..36a943cc 100644 --- a/src/main/java/com/back/web7_9_codecrete_be/global/error/code/ArtistErrorCode.java +++ b/src/main/java/com/back/web7_9_codecrete_be/global/error/code/ArtistErrorCode.java @@ -14,7 +14,8 @@ public enum ArtistErrorCode implements ErrorCode { ARTIST_NOT_FOUND(HttpStatus.NOT_FOUND, "AT-102", "아티스트를 찾을 수 없습니다."), ARTIST_ALREADY_EXISTS(HttpStatus.CONFLICT, "AT-103", "이미 존재하는 아티스트입니다."), SPOTIFY_NOT_FOUND(HttpStatus.NOT_FOUND, "AT-104", "존재하지 않는 Spotify Artist Key 입니다."), - INVALID_UPDATE_REQUEST(HttpStatus.BAD_REQUEST, "AT-105", "수정할 내용이 없습니다."); + INVALID_UPDATE_REQUEST(HttpStatus.BAD_REQUEST, "AT-105", "수정할 내용이 없습니다."), + INVALID_SEARCH_KEYWORD(HttpStatus.BAD_REQUEST, "AT-106", "입력 값이 없습니다."); private final HttpStatus status; private final String code;