update the app
This commit is contained in:
@@ -34,6 +34,12 @@ class ApiClient {
|
||||
handler.next(response);
|
||||
},
|
||||
onError: (e, handler) {
|
||||
// Log API errors to help diagnose issues during development.
|
||||
final resp = e.response;
|
||||
if (resp != null) {
|
||||
// ignore: avoid_print
|
||||
print('[API] ${e.requestOptions.method} ${e.requestOptions.path} → ${resp.statusCode}: ${resp.data}');
|
||||
}
|
||||
handler.next(e);
|
||||
},
|
||||
));
|
||||
|
||||
@@ -74,7 +74,8 @@ class MarketplaceService {
|
||||
required String firstName,
|
||||
required String lastName,
|
||||
required String email,
|
||||
String? phone,
|
||||
required String phone,
|
||||
required String driverLicense,
|
||||
required DateTime startDate,
|
||||
required DateTime endDate,
|
||||
String? notes,
|
||||
@@ -86,7 +87,8 @@ class MarketplaceService {
|
||||
'firstName': firstName,
|
||||
'lastName': lastName,
|
||||
'email': email,
|
||||
if (phone != null && phone.isNotEmpty) 'phone': phone,
|
||||
'phone': phone,
|
||||
'driverLicense': driverLicense,
|
||||
'startDate': '${startDate.toIso8601String().substring(0, 10)}T00:00:00.000Z',
|
||||
'endDate': '${endDate.toIso8601String().substring(0, 10)}T00:00:00.000Z',
|
||||
if (notes != null && notes.isNotEmpty) 'notes': notes,
|
||||
|
||||
Reference in New Issue
Block a user