File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed
src/main/kotlin/org/gitanimals/inbox/controller/response Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,8 @@ inboxes = [
1818 "body" : " devxb에게 git-goods 길드가입 요청이 왔어요." ,
1919 "redirectTo" : " /auctions/" ,
2020 "type" : " INBOX" // (INBOX, NOTICE...)
21- "status" : " UNREAD" // READ or UNREAD
21+ "status" : " UNREAD" , // READ or UNREAD
22+ "publishedAt" : " 2024-10-14T12:34:56Z" ,
2223 }
2324 ...
2425]
Original file line number Diff line number Diff line change @@ -3,6 +3,8 @@ package org.gitanimals.inbox.controller.response
33import org.gitanimals.inbox.domain.InboxApplication
44import org.gitanimals.inbox.domain.InboxStatus
55import org.gitanimals.inbox.domain.InboxType
6+ import java.time.LocalDateTime
7+ import java.time.ZoneId
68
79data class InboxResponse (
810 val inboxes : List <InboxElement >
@@ -16,6 +18,7 @@ data class InboxResponse(
1618 val redirectTo : String ,
1719 val type : InboxType ,
1820 val status : InboxStatus ,
21+ val publishedAt : LocalDateTime ,
1922 )
2023
2124 companion object {
@@ -31,6 +34,10 @@ data class InboxResponse(
3134 redirectTo = it.redirectTo,
3235 type = it.type,
3336 status = it.getStatus(),
37+ publishedAt = LocalDateTime .ofInstant(
38+ it.publisher.publishedAt,
39+ ZoneId .of(" Asia/Seoul" ),
40+ )
3441 )
3542 }
3643 )
You can’t perform that action at this time.
0 commit comments