feat: 更新素材管理和举报风险地图
This commit is contained in:
23
suixinkan/Features/Setting/API/SettingAPI.swift
Normal file
23
suixinkan/Features/Setting/API/SettingAPI.swift
Normal file
@ -0,0 +1,23 @@
|
||||
//
|
||||
// SettingAPI.swift
|
||||
// suixinkan
|
||||
//
|
||||
|
||||
import Foundation
|
||||
|
||||
@MainActor
|
||||
/// 设置中心 API,封装版本检查等设置页相关接口。
|
||||
final class SettingAPI {
|
||||
private let client: APIClient
|
||||
|
||||
init(client: APIClient) {
|
||||
self.client = client
|
||||
}
|
||||
|
||||
/// 拉取后端配置的最新 App 版本。
|
||||
func checkLatestVersion() async throws -> VersionResponse {
|
||||
try await client.send(
|
||||
APIRequest(method: .get, path: "/api/app/latest-version")
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user