We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d65da0f commit af5d870Copy full SHA for af5d870
src/main/java/com/moa/moa_server/domain/vote/dto/response/mine/MyVoteItem.java
@@ -17,7 +17,13 @@ public record MyVoteItem(
17
) {
18
19
public static MyVoteItem from(Vote vote, List<VoteOptionResultWithId> results) {
20
- String status = vote.getClosedAt().isAfter(LocalDateTime.now()) ? "OPEN" : "CLOSED";
+ String status;
21
+ if (vote.getVoteStatus() == Vote.VoteStatus.REJECTED || vote.getVoteStatus() == Vote.VoteStatus.PENDING) {
22
+ status = vote.getVoteStatus().name();
23
+ } else {
24
+ status = vote.getClosedAt().isAfter(LocalDateTime.now()) ? "OPEN" : "CLOSED";
25
+ }
26
+
27
return new MyVoteItem(
28
vote.getId(),
29
vote.getGroup().getId(),
0 commit comments