Skip to content

Commit

Permalink
[#49] fix: DTO 옵셔널 추가
Browse files Browse the repository at this point in the history
  • Loading branch information
BMO5 committed Jun 23, 2021
1 parent eb68c55 commit 6ad9499
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ struct IssueListResponseDTO: Decodable {
extension IssueListResponseDTO {

func toDomain() -> IssueList {
return IssueList(issues: data.map { return Issue(id: $0.id, title: $0.title, milestone: $0.milestone.title, labels: $0.labels.map { $0.toDomain() }) })
return IssueList(issues: data.map { return Issue(id: $0.id, title: $0.title, milestone: $0.milestone?.title ?? "", labels: $0.labels.map { $0.toDomain() }) })
}

}
Expand All @@ -22,7 +22,7 @@ struct IssueDTO: Decodable {
let isOpen: Bool
let writer: WriterDTO
let assignees: [WriterDTO]
let milestone: MilestoneDTO
let milestone: MilestoneDTO?
let labels: [LabelDTO]

enum CodingKeys: String, CodingKey {
Expand Down

0 comments on commit 6ad9499

Please sign in to comment.