Skip to content

Commit

Permalink
✏️ [FIX] 스티커 부착시 UUID도 넘기도록 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
ddongseop committed Jan 17, 2024
1 parent a5fc66f commit 1ce0f82
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,15 @@

public record StickerPostResponseDto(

@Schema(description = "레큐북 UUID", example = "ee4f66f9-9cf4-4b28-90f4-f71d0ecba021")
String bookUuid,

@Schema(description = "생성된 부착 스티커 고유 id", example = "1")
Long postedStickerId
) {
public static StickerPostResponseDto of(PostedSticker postedSticker) {
public static StickerPostResponseDto of(String bookUuid, PostedSticker postedSticker) {
return new StickerPostResponseDto(
bookUuid,
postedSticker.getId()
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public StickerPostResponseDto postSticker(PostedSticker postedSticker, Member me

member.addPostedSticker(postedSticker);
book.addPostedSticker(postedSticker);
return StickerPostResponseDto.of(postedStickerRepository.save(postedSticker));

return StickerPostResponseDto.of(book.getUuid(), postedStickerRepository.save(postedSticker));
}
}

0 comments on commit 1ce0f82

Please sign in to comment.