This commit is contained in:
Daniel Arantes Loverde
2026-03-10 09:19:50 -03:00
parent 728cc94525
commit 5fa98ce358
15 changed files with 570 additions and 94 deletions

View File

@@ -82,15 +82,7 @@ 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, route this endpoint through URLSession to preserve raw JSON body behavior.
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