Skip to content

Commit

Permalink
Merge pull request #117 from 9uttery/feat/post-joy-dto-api-#116
Browse files Browse the repository at this point in the history
[Feature] 소확행 기록 DTO joyId 필드 추가
  • Loading branch information
hojeong2747 authored Feb 19, 2024
2 parents 73cf0fd + 39d491c commit 611e83e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

@Schema(description = "소확행 기록 응답")
public record JoyCreateResponse(
@Schema(description = "소확행 아이디", example = "11")
Long joyId,
@Schema(description = "소확행 썸네일 아이콘 번호", example = "3")
Integer joyIconNum,
@Schema(description = "소확행 내용", example = "낮잠자기")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public JoyCreateResponse createJoy(final JoyCreateRequest joyCreateRequest, User
final Joy joy = Joy.createPersonalJoy(user, 1 + random.nextInt(bound), joyCreateRequest.contents());
joyRepository.save(joy);

JoyCreateResponse joyCreateResponse = new JoyCreateResponse(joy.getJoyIconNum(), joy.getContents());
JoyCreateResponse joyCreateResponse = new JoyCreateResponse(joy.getJoyId(), joy.getJoyIconNum(), joy.getContents());
return joyCreateResponse;
}

Expand Down

0 comments on commit 611e83e

Please sign in to comment.