diff --git a/Sources/QappleRepository/API/QappleAPI.swift b/Sources/QappleRepository/API/QappleAPI.swift index c0e5a7c..19b85c1 100644 --- a/Sources/QappleRepository/API/QappleAPI.swift +++ b/Sources/QappleRepository/API/QappleAPI.swift @@ -28,7 +28,7 @@ enum QappleAPI { case delete(answerId: Int64) /// 질문에 대한 답변 조회 - case listOfQuestion(questionId: Int64, threshold: String?, pageSize: Int32 = 25) + case listOfQuestion(questionId: Int64, threshold: Int?, pageSize: Int32 = 25) /// 답변 생성 case create(questionId: Int64) diff --git a/Sources/QappleRepository/DTO/Answer/AnswerListOfQuestion.swift b/Sources/QappleRepository/DTO/Answer/AnswerListOfQuestion.swift index 5497e82..9641958 100644 --- a/Sources/QappleRepository/DTO/Answer/AnswerListOfQuestion.swift +++ b/Sources/QappleRepository/DTO/Answer/AnswerListOfQuestion.swift @@ -24,7 +24,9 @@ public struct AnswerListOfQuestion: Decodable, Sendable { public let content: String public let isMine: Bool public let isReported: Bool - public let isLiked: Bool + public let isLiked: Bool? public let writeAt: String + public let commentCount: Int + public let heartCount: Int } } diff --git a/Sources/QappleRepository/UseCase/AnswerAPI.swift b/Sources/QappleRepository/UseCase/AnswerAPI.swift index c8c8b53..17812c6 100644 --- a/Sources/QappleRepository/UseCase/AnswerAPI.swift +++ b/Sources/QappleRepository/UseCase/AnswerAPI.swift @@ -37,7 +37,7 @@ public enum AnswerAPI: Sendable { /// 특정 질문에 대한 답변리스트를 조회하는 API입니다. public static func fetchListOfQuestion( questionId: Int, - threshold: String?, + threshold: Int?, pageSize: Int, server: Server, accessToken: String diff --git a/Tests/QappleRepositoryTests/AnswerAPITests.swift b/Tests/QappleRepositoryTests/AnswerAPITests.swift index 2821e3a..0024fc4 100644 --- a/Tests/QappleRepositoryTests/AnswerAPITests.swift +++ b/Tests/QappleRepositoryTests/AnswerAPITests.swift @@ -43,7 +43,7 @@ struct AnswerAPITests { @Test("질문에 대한 답변 리스트 테스트") func fetchListOfQuestion() async throws { let _ = try await AnswerAPI.fetchListOfQuestion( - questionId: 1, + questionId: 100, threshold: nil, pageSize: 30, server: .test,