Skip to content

Commit

Permalink
Merge pull request #121 from mash-up-kr/junhyoung/feat-space-response…
Browse files Browse the repository at this point in the history
…-questionid

feat: SpaceResponse question field
  • Loading branch information
toychip authored Aug 22, 2024
2 parents f59c0fe + 3f58f31 commit e3dcfb8
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions api/src/main/kotlin/com/mashup/dojo/MemberController.kt
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ class MemberController(
receivedMySpacePicks.map {
SpacePickDetail(
pickId = it.pickId.value,
questionId = it.questionId.value,
rank = it.rank,
pickContent = it.pickContent,
pickCount = it.pickCount,
Expand Down Expand Up @@ -252,6 +253,7 @@ class MemberController(
receivedMySpacePicks.map {
SpacePickDetail(
pickId = it.pickId.value,
questionId = it.questionId.value,
rank = it.rank,
pickContent = it.pickContent,
pickCount = it.pickCount,
Expand Down
2 changes: 2 additions & 0 deletions api/src/main/kotlin/com/mashup/dojo/dto/SpaceResponse.kt
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ import java.time.LocalDateTime
data class SpacePickDetail(
@Schema(description = "픽의 고유 ID", example = "pickId1")
val pickId: String,
@Schema(description = "질문의 고유 ID", example = "questionId1")
val questionId: String,
@Schema(description = "픽의 순위", example = "1")
val rank: Int,
@Schema(description = "픽의 내용", example = "대충 작업해도 퀄리티 잘 내오는 사람은?")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@ interface PickService {

data class SpacePickDetail(
val pickId: PickId,
val questionId: QuestionId,
val rank: Int = -1,
val pickContent: String,
val pickCount: Int,
Expand Down Expand Up @@ -448,6 +449,7 @@ class DefaultPickService(
val pickCount = pickRepository.findPickDetailCount(memberId = memberId.value, questionId = pick.questionId)
PickService.SpacePickDetail(
pickId = PickId(pick.pickId),
questionId = QuestionId(pick.questionId),
pickCount = pickCount.toInt(),
pickContent = pick.questionContent,
createdAt = pick.createdAt
Expand Down

0 comments on commit e3dcfb8

Please sign in to comment.