Colapse fix

This commit is contained in:
Daniel Arantes Loverde
2026-02-09 14:41:18 -03:00
parent 54686397b9
commit 3176b67914
8 changed files with 683 additions and 127 deletions

View File

@@ -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