feat: 增加门店身份注销流程
This commit is contained in:
@@ -20,6 +20,8 @@ nonisolated struct APIRequest<Response: Decodable> {
|
||||
var queryItems: [URLQueryItem]
|
||||
var headers: [String: String]
|
||||
var body: AnyEncodable?
|
||||
/// 敏感请求关闭正文日志,避免验证码和注销资产进入调试日志。
|
||||
var logsPayload: Bool
|
||||
|
||||
/// 创建一个 API 请求,并把可编码请求体擦除为统一的 AnyEncodable。
|
||||
init<Body: Encodable>(
|
||||
@@ -27,13 +29,15 @@ nonisolated struct APIRequest<Response: Decodable> {
|
||||
path: String,
|
||||
queryItems: [URLQueryItem] = [],
|
||||
headers: [String: String] = [:],
|
||||
body: Body? = Optional<EmptyPayload>.none
|
||||
body: Body? = Optional<EmptyPayload>.none,
|
||||
logsPayload: Bool = true
|
||||
) {
|
||||
self.method = method
|
||||
self.path = path
|
||||
self.queryItems = queryItems
|
||||
self.headers = headers
|
||||
self.body = body.map(AnyEncodable.init)
|
||||
self.logsPayload = logsPayload
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user