Skip to content

Commit d832565

Browse files
committed
fix: Response 시, SpotifyId를 String 타입으로 반환 #3
1 parent b6abfda commit d832565

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main/java/org/dfbf/soundlink/domain/emotionRecord/dto/response/EmotionRecordUpdateResponseDTO.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
public record EmotionRecordUpdateResponseDTO(
66
Long recordId,
7-
Long spotifyId,
7+
String spotifyId,
88
String title,
99
String artist,
1010
String albumImage,
@@ -14,7 +14,7 @@ public record EmotionRecordUpdateResponseDTO(
1414
public static EmotionRecordUpdateResponseDTO fromEntity(EmotionRecord record) {
1515
return new EmotionRecordUpdateResponseDTO(
1616
record.getRecordId(),
17-
record.getSpotifyMusic().getSpotifyId(),
17+
String.valueOf(record.getSpotifyMusic().getSpotifyId()),
1818
record.getSpotifyMusic().getTitle(),
1919
record.getSpotifyMusic().getArtist(),
2020
record.getSpotifyMusic().getAlbumImage(),

src/main/java/org/dfbf/soundlink/domain/emotionRecord/dto/response/SpotifyMusicResponseDTO.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@
22

33
import org.dfbf.soundlink.domain.emotionRecord.entity.SpotifyMusic;
44

5-
public record SpotifyMusicResponseDTO(Long spotifyId, String title, String artist, String albumImage) {
5+
public record SpotifyMusicResponseDTO(String spotifyId, String title, String artist, String albumImage) {
66
public static SpotifyMusicResponseDTO fromEntity(SpotifyMusic music) {
77
return new SpotifyMusicResponseDTO(
8-
music.getSpotifyId(),
8+
String.valueOf(music.getSpotifyId()),
99
music.getTitle(),
1010
music.getArtist(),
1111
music.getAlbumImage()

0 commit comments

Comments
 (0)