feat: 상단에 최근 공지사항 표시

This commit is contained in:
Yu Sung
2025-07-28 20:02:54 +09:00
parent b20a6cb0f6
commit 7d22a29517
4 changed files with 62 additions and 13 deletions

View File

@@ -10,6 +10,7 @@ import Moya
enum NoticeApi {
case getNotices
case getLatestNotice
}
extension NoticeApi: TargetType {
@@ -21,6 +22,9 @@ extension NoticeApi: TargetType {
switch self {
case .getNotices:
return "/notice"
case .getLatestNotice:
return "/notice/latest"
}
}
@@ -33,6 +37,9 @@ extension NoticeApi: TargetType {
case .getNotices:
let parameters = ["timezone": TimeZone.current.identifier] as [String: Any]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getLatestNotice:
return .requestPlain
}
}