Colapse fix
This commit is contained in:
@@ -74,6 +74,15 @@ final class ApiClient {
|
||||
}
|
||||
|
||||
func send<T: Decodable>(_ request: ApiRequest) async throws -> T {
|
||||
// NOTE:
|
||||
// /api/customer/login is strict about body fields (email/phoneNumber/otp).
|
||||
// On iOS, routing this endpoint through URLSession ensures JSON body arrives as-is.
|
||||
if request.path == "/api/customer/login" {
|
||||
if let body = request.body, let bodyText = String(data: body, encoding: .utf8) {
|
||||
print("[ApiClient] /api/customer/login body: \(bodyText)")
|
||||
}
|
||||
return try await sendWithURLSession(request)
|
||||
}
|
||||
#if canImport(LCEssentials) && os(iOS)
|
||||
return try await sendWithLCEssentials(request)
|
||||
#else
|
||||
|
||||
Reference in New Issue
Block a user