Skip to content

Commit

Permalink
🎨 Refactor Entity and DTO to align with server credits API specification
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiteHyun committed May 6, 2024
1 parent 7403f2f commit 2c83141
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
4 changes: 2 additions & 2 deletions APIService/Sources/CreditsAPI/CreditsService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ private extension Credits {
init(dto: CreditsResponse) {
self.init(
title: dto.title,
body: dto.body,
date: dto.date
content: dto.content,
date: dto.createdAt
)
}
}
5 changes: 3 additions & 2 deletions APIService/Sources/CreditsAPI/Responses/CreditsResponse.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ import Foundation
// MARK: - ProductResponse

struct CreditsResponse: Decodable {
let id: Int
let title: String
let body: String
let date: Date
let content: String
let createdAt: Date
}
4 changes: 2 additions & 2 deletions Entity/Sources/Entity/Credits/Credits.swift
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ public struct Credits {
/// 크레딧 생성 날짜
public let date: Date

public init(title: String, body: String, date: Date) {
public init(title: String, content: String, date: Date) {
self.title = title
self.body = body
body = content
self.date = date
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
buildConfiguration = "Release"
selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
launchStyle = "0"
Expand Down

0 comments on commit 2c83141

Please sign in to comment.