Skip to content

Commit

Permalink
refac: 태그 관련 응답값 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
leeheefull committed Dec 10, 2024
1 parent af9db38 commit a6c7efa
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ data class GetGroupResponse(
val userCapacity: Int,
val ranks: List<GetGroupRankResponse>? = null,
/** 그룹 태그 리스트 */
val tags: List<GroupTagResponse>?,
val tagNames: List<String>?,
val countCheeredUp: Long? = null,
) {
companion object {
Expand All @@ -39,7 +39,7 @@ data class GetGroupResponse(
joinCode = group.joinCode,
userCount = group.userCount,
userCapacity = group.userCapacity,
tags = tags?.map { GroupTagResponse(it.id, it.name) },
tagNames = tags?.map { it.name },
countCheeredUp = countCheeredUp,
)
}
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ data class MyGroupResponse(
val name: String,
/** 그룹 설명 */
val description: String?,
/** owner uid */
val ownerUid: Long,
/** 그룹원 수 */
val userCount: Int,
/** 그룹 정원 */
Expand All @@ -22,6 +24,7 @@ data class MyGroupResponse(
id = group.id,
name = group.name,
description = group.description,
ownerUid = group.ownerUid,
userCount = userCount,
userCapacity = group.userCapacity,
ownerNickname = ownerNickname
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,15 @@ data class UpdateGroupResponse(
/** 그룹 설명 */
val description: String?,
/** 그룹 태그 리스트 */
val tags: List<GroupTagResponse>?,
val tagNames: List<String>?,
) {
companion object {
fun from(group: Group, tags: List<GroupTag>): UpdateGroupResponse {
return UpdateGroupResponse(
id = group.id,
name = group.name,
description = group.description,
tags = tags.map { GroupTagResponse(it.id, it.name) },
tagNames = tags.map { it.name },
)
}
}
Expand Down

0 comments on commit a6c7efa

Please sign in to comment.