feat(mypage): 최신 공지 배열과 제목 롤링을 적용한다

This commit is contained in:
Yu Sung
2026-10-28 17:15:38 +09:00
parent 8c08861b34
commit 42bdfb8779
9 changed files with 462 additions and 43 deletions
@@ -10,7 +10,7 @@ import Moya
enum NoticeApi {
case getNotices
case getLatestNotice
case getLatestNotices
}
extension NoticeApi: TargetType {
@@ -23,8 +23,8 @@ extension NoticeApi: TargetType {
case .getNotices:
return "/notice"
case .getLatestNotice:
return "/notice/latest"
case .getLatestNotices:
return "/api/v2/notices/latest"
}
}
@@ -38,15 +38,17 @@ extension NoticeApi: TargetType {
let parameters = ["timezone": TimeZone.current.identifier] as [String: Any]
return .requestParameters(parameters: parameters, encoding: URLEncoding.queryString)
case .getLatestNotice:
case .getLatestNotices:
return .requestPlain
}
}
var headers: [String : String]? {
switch self {
default:
case .getNotices:
return ["Authorization": "Bearer \(UserDefaults.string(forKey: UserDefaultsKey.token))"]
case .getLatestNotices:
return nil
}
}
}