Skip to content

Commit 7fafe77

Browse files
authored
Merge pull request #39 from Team-Capple/fix/#38-AnswerEntityModify
[FIX] ๋‹ต๋ณ€ API ์ˆ˜์ •
2 parents 9524815 + ebf3ae4 commit 7fafe77

File tree

8 files changed

+21
-2
lines changed

8 files changed

+21
-2
lines changed

โ€ŽSources/QappleRepository/DTO/Answer/AnswerListOfMine.swiftโ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ public struct AnswerListOfMine: Decodable, Sendable {
2424
public let profileImage: String?
2525
public let content: String
2626
public let heartCount: Int
27+
public let commentCount: Int
2728
public let writeAt: String
2829
public let isLiked: Bool
2930
}

โ€ŽSources/QappleRepository/DTO/Answer/AnswerListOfQuestion.swiftโ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public struct AnswerListOfQuestion: Decodable, Sendable {
2424
public let content: String
2525
public let isMine: Bool
2626
public let isReported: Bool
27-
public let isLiked: Bool?
27+
public let isLiked: Bool
2828
public let writeAt: String
2929
public let commentCount: Int
3030
public let heartCount: Int

โ€ŽSources/QappleRepository/UseCase/AdminQuestionAPI.swiftโ€Ž

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ import Foundation
1212
*/
1313
public enum AdminQuestionAPI: Sendable {
1414
/// ์งˆ๋ฌธ์„ ์ƒ์„ฑํ•˜๋Š” API ์ž…๋‹ˆ๋‹ค.
15+
@discardableResult
1516
public static func createQuestion(
1617
questionStatus: CreateQuestionRequest.QuestionStatus,
1718
content: String,
@@ -29,6 +30,7 @@ public enum AdminQuestionAPI: Sendable {
2930
}
3031

3132
/// ์งˆ๋ฌธ์„ ์‚ญ์ œํ•˜๋Š” API ์ž…๋‹ˆ๋‹ค.
33+
@discardableResult
3234
public static func deleteQuestion(
3335
questionId: Int,
3436
server: Server,

โ€ŽSources/QappleRepository/UseCase/AnswerAPI.swiftโ€Ž

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public enum AnswerAPI: Sendable {
2525
}
2626

2727
/// ๋‹ต๋ณ€ ์‚ญ์ œ API ์ž…๋‹ˆ๋‹ค.
28+
@discardableResult
2829
public static func delete(
2930
answerId: Int,
3031
server: Server,
@@ -51,6 +52,7 @@ public enum AnswerAPI: Sendable {
5152
}
5253

5354
/// ๋‹ต๋ณ€ ์ƒ์„ฑ API ์ž…๋‹ˆ๋‹ค.
55+
@discardableResult
5456
public static func create(
5557
content: String,
5658
questionId: Int,
@@ -67,6 +69,8 @@ public enum AnswerAPI: Sendable {
6769
)
6870
}
6971

72+
/// ๋‹ต๋ณ€์— ์ข‹์•„์š” ์ถ”๊ฐ€ or ์ทจ์†Œ๋ฅผ ํ•˜๋Š” API ์ž…๋‹ˆ๋‹ค.
73+
@discardableResult
7074
public static func like(
7175
answerId: Int,
7276
server: Server,

โ€ŽSources/QappleRepository/UseCase/AnswerCommentAPI.swiftโ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ public enum AnswerCommentAPI: Sendable {
2020
}
2121

2222
/// ํŠน์ • ๋‹ต๋ณ€์— ๋Œ“๊ธ€์„ ์ƒ์„ฑํ•ฉ๋‹ˆ๋‹ค.
23+
@discardableResult
2324
public static func createAnswerComment(
2425
answerId: Int,
2526
content: String,
@@ -33,6 +34,7 @@ public enum AnswerCommentAPI: Sendable {
3334
}
3435

3536
/// ๋‹ต๋ณ€์— ์žˆ๋Š” ํŠน์ • ๋Œ“๊ธ€์„ ์‚ญ์ œํ•ฉ๋‹ˆ๋‹ค.
37+
@discardableResult
3638
public static func deleteAnswerComment(
3739
answerCommentId: Int,
3840
server: Server,
@@ -44,6 +46,7 @@ public enum AnswerCommentAPI: Sendable {
4446
}
4547

4648
/// ๋‹ต๋ณ€์— ์žˆ๋Š” ํŠน์ • ๋Œ“๊ธ€์— ์ข‹์•„์š” ์ถ”๊ฐ€ or ์ทจ์†Œ ํ•ฉ๋‹ˆ๋‹ค.
49+
@discardableResult
4750
public static func likeAnswerComment(
4851
answerCommentId: Int,
4952
server: Server,

โ€ŽSources/QappleRepository/UseCase/BoardAPI.swiftโ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ public enum BoardAPI {
2525
}
2626

2727
/// ๊ฒŒ์‹œ๊ธ€ ์ƒ์„ฑ API์ž…๋‹ˆ๋‹ค.
28+
@discardableResult
2829
public static func create(
2930
content: String,
3031
boardType: CreateBoardRequest.BoardType,
@@ -51,6 +52,7 @@ public enum BoardAPI {
5152
}
5253

5354
/// ๊ฒŒ์‹œ๊ธ€ ์‚ญ์ œ API์ž…๋‹ˆ๋‹ค.
55+
@discardableResult
5456
public static func delete(
5557
boardId: Int,
5658
server: Server,
@@ -61,6 +63,7 @@ public enum BoardAPI {
6163
}
6264

6365
/// ๊ฒŒ์‹œ๊ธ€ ์ข‹์•„์š” ๋ฐ ์ทจ์†Œ API์ž…๋‹ˆ๋‹ค.
66+
@discardableResult
6467
public static func like(
6568
boardId: Int,
6669
server: Server,

โ€ŽSources/QappleRepository/UseCase/BoardCommentAPI.swiftโ€Ž

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ public enum BoardCommentAPI {
3030
}
3131

3232
/// ๊ฒŒ์‹œ๊ธ€ ๋Œ“๊ธ€ ์ƒ์„ฑ API์ž…๋‹ˆ๋‹ค.
33+
@discardableResult
3334
public static func create(
3435
boardId: Int,
3536
content: String,
@@ -51,6 +52,7 @@ public enum BoardCommentAPI {
5152
}
5253

5354
/// ๊ฒŒ์‹œ๊ธ€ ๋Œ“๊ธ€ ์‚ญ์ œ API์ž…๋‹ˆ๋‹ค.
55+
@discardableResult
5456
public static func delete(
5557
commentId: Int,
5658
server: Server,
@@ -67,6 +69,7 @@ public enum BoardCommentAPI {
6769
}
6870

6971
/// ๊ฒŒ์‹œ๊ธ€ ๋Œ“๊ธ€ ์ข‹์•„์š” ๋ฐ ์ทจ์†Œ API์ž…๋‹ˆ๋‹ค.
72+
@discardableResult
7073
public static func like(
7174
commentId: Int,
7275
server: Server,

โ€ŽSources/QappleRepository/UseCase/ReportAPI.swiftโ€Ž

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ import Foundation
1111
public enum ReportAPI: Sendable {
1212

1313
/// ๋‹ต๋ณ€ ์‹ ๊ณ  API์ž…๋‹ˆ๋‹ค.
14+
@discardableResult
1415
public static func reportAnswer(
1516
answerId: Int,
1617
reportType: ReportType,
@@ -30,6 +31,7 @@ public enum ReportAPI: Sendable {
3031
}
3132

3233
/// ๊ฒŒ์‹œ๊ธ€ ์‹ ๊ณ  API์ž…๋‹ˆ๋‹ค.
34+
@discardableResult
3335
public static func reportBoard(
3436
boardId: Int,
3537
reportType: ReportType,
@@ -48,7 +50,8 @@ public enum ReportAPI: Sendable {
4850
)
4951
}
5052

51-
/// ๊ฒŒ์‹œ๊ธ€ ์‹ ๊ณ  API์ž…๋‹ˆ๋‹ค.
53+
/// ๊ฒŒ์‹œ๊ธ€์˜ ๋‹ฌ๋ฆฐ ํŠน์ • ๋Œ“๊ธ€ ์‹ ๊ณ  API์ž…๋‹ˆ๋‹ค.
54+
@discardableResult
5255
public static func reportBoardComment(
5356
boardCommentId: Int,
5457
reportType: ReportType,

0 commit comments

Comments
ย (0)