Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Sources/QappleRepository/DTO/Answer/AnswerListOfMine.swift
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ public struct AnswerListOfMine: Decodable, Sendable {
public let profileImage: String?
public let content: String
public let heartCount: Int
public let commentCount: Int
public let writeAt: String
public let isLiked: Bool
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ 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
Expand Down
2 changes: 2 additions & 0 deletions Sources/QappleRepository/UseCase/AdminQuestionAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import Foundation
*/
public enum AdminQuestionAPI: Sendable {
/// 질문을 생성하는 API 입니다.
@discardableResult
public static func createQuestion(
questionStatus: CreateQuestionRequest.QuestionStatus,
content: String,
Expand All @@ -29,6 +30,7 @@ public enum AdminQuestionAPI: Sendable {
}

/// 질문을 삭제하는 API 입니다.
@discardableResult
public static func deleteQuestion(
questionId: Int,
server: Server,
Expand Down
4 changes: 4 additions & 0 deletions Sources/QappleRepository/UseCase/AnswerAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public enum AnswerAPI: Sendable {
}

/// 답변 삭제 API 입니다.
@discardableResult
public static func delete(
answerId: Int,
server: Server,
Expand All @@ -51,6 +52,7 @@ public enum AnswerAPI: Sendable {
}

/// 답변 생성 API 입니다.
@discardableResult
public static func create(
content: String,
questionId: Int,
Expand All @@ -67,6 +69,8 @@ public enum AnswerAPI: Sendable {
)
}

/// 답변에 좋아요 추가 or 취소를 하는 API 입니다.
@discardableResult
public static func like(
answerId: Int,
server: Server,
Expand Down
3 changes: 3 additions & 0 deletions Sources/QappleRepository/UseCase/AnswerCommentAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ public enum AnswerCommentAPI: Sendable {
}

/// 특정 답변에 댓글을 생성합니다.
@discardableResult
public static func createAnswerComment(
answerId: Int,
content: String,
Expand All @@ -33,6 +34,7 @@ public enum AnswerCommentAPI: Sendable {
}

/// 답변에 있는 특정 댓글을 삭제합니다.
@discardableResult
public static func deleteAnswerComment(
answerCommentId: Int,
server: Server,
Expand All @@ -44,6 +46,7 @@ public enum AnswerCommentAPI: Sendable {
}

/// 답변에 있는 특정 댓글에 좋아요 추가 or 취소 합니다.
@discardableResult
public static func likeAnswerComment(
answerCommentId: Int,
server: Server,
Expand Down
3 changes: 3 additions & 0 deletions Sources/QappleRepository/UseCase/BoardAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ public enum BoardAPI {
}

/// 게시글 생성 API입니다.
@discardableResult
public static func create(
content: String,
boardType: CreateBoardRequest.BoardType,
Expand All @@ -51,6 +52,7 @@ public enum BoardAPI {
}

/// 게시글 삭제 API입니다.
@discardableResult
public static func delete(
boardId: Int,
server: Server,
Expand All @@ -61,6 +63,7 @@ public enum BoardAPI {
}

/// 게시글 좋아요 및 취소 API입니다.
@discardableResult
public static func like(
boardId: Int,
server: Server,
Expand Down
3 changes: 3 additions & 0 deletions Sources/QappleRepository/UseCase/BoardCommentAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ public enum BoardCommentAPI {
}

/// 게시글 댓글 생성 API입니다.
@discardableResult
public static func create(
boardId: Int,
content: String,
Expand All @@ -51,6 +52,7 @@ public enum BoardCommentAPI {
}

/// 게시글 댓글 삭제 API입니다.
@discardableResult
public static func delete(
commentId: Int,
server: Server,
Expand All @@ -67,6 +69,7 @@ public enum BoardCommentAPI {
}

/// 게시글 댓글 좋아요 및 취소 API입니다.
@discardableResult
public static func like(
commentId: Int,
server: Server,
Expand Down
5 changes: 4 additions & 1 deletion Sources/QappleRepository/UseCase/ReportAPI.swift
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import Foundation
public enum ReportAPI: Sendable {

/// 답변 신고 API입니다.
@discardableResult
public static func reportAnswer(
answerId: Int,
reportType: ReportType,
Expand All @@ -30,6 +31,7 @@ public enum ReportAPI: Sendable {
}

/// 게시글 신고 API입니다.
@discardableResult
public static func reportBoard(
boardId: Int,
reportType: ReportType,
Expand All @@ -48,7 +50,8 @@ public enum ReportAPI: Sendable {
)
}

/// 게시글 신고 API입니다.
/// 게시글의 달린 특정 댓글 신고 API입니다.
@discardableResult
public static func reportBoardComment(
boardCommentId: Int,
reportType: ReportType,
Expand Down