Skip to content

Commit 0c3e1b7

Browse files
committed
CLAP-153 작업 히스토리 응답 구조 변경
1 parent 8903a12 commit 0c3e1b7

File tree

2 files changed

+7
-8
lines changed

2 files changed

+7
-8
lines changed

src/main/java/clap/server/adapter/inbound/web/dto/task/response/FindTaskHistoryResponse.java

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ public static record TaskHistoryResponse(
1818
) {}
1919

2020
public static record Details(
21-
ProcessorChanged processorChanged,
22-
TaskStatusSwitched taskStatusSwitched,
21+
TaskDetails taskDetails,
2322
CommentDetails commentDetails,
2423
CommentFileDetails commentFileDetails
2524
) {}
@@ -32,6 +31,10 @@ public static record TaskStatusSwitched(
3231
String taskStatus
3332
) {}
3433

34+
public static record TaskDetails(
35+
String newValue
36+
) {}
37+
3538
public static record CommentDetails(
3639
String name,
3740
String profileImageUrl,

src/main/java/clap/server/application/mapper/TaskHistoryMapper.java

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,23 +20,20 @@ public static FindTaskHistoryResponse toFindTaskHistoryResponse(List<TaskHistory
2020
FindTaskHistoryResponse.Details details =
2121
switch (taskHistory.getType()) {
2222
case PROCESSOR_CHANGED, PROCESSOR_ASSIGNED -> new FindTaskHistoryResponse.Details(
23-
new FindTaskHistoryResponse.ProcessorChanged(
23+
new FindTaskHistoryResponse.TaskDetails(
2424
taskHistory.getTaskModificationInfo().getModifiedMember().getNickname()
2525
),
2626
null,
27-
null,
2827
null
2928
);
3029
case STATUS_SWITCHED -> new FindTaskHistoryResponse.Details(
31-
null,
32-
new FindTaskHistoryResponse.TaskStatusSwitched(
30+
new FindTaskHistoryResponse.TaskDetails(
3331
taskHistory.getTaskModificationInfo().getTask().getTaskStatus().getDescription()
3432
),
3533
null,
3634
null
3735
);
3836
case COMMENT -> new FindTaskHistoryResponse.Details(
39-
null,
4037
null,
4138
new FindTaskHistoryResponse.CommentDetails(
4239
taskHistory.getComment().getMember().getNickname(),
@@ -47,7 +44,6 @@ public static FindTaskHistoryResponse toFindTaskHistoryResponse(List<TaskHistory
4744
null
4845
);
4946
case COMMENT_FILE -> new FindTaskHistoryResponse.Details(
50-
null,
5147
null,
5248
null,
5349
attachments.stream()

0 commit comments

Comments
 (0)