Update: 2026-07-31 19:14:05

This commit is contained in:
Hamza-Ayed
2026-07-31 19:14:05 +03:00
parent 7362f1ce96
commit 0452c36379
@@ -645,11 +645,17 @@ class LoginDriverController extends GetxController {
'aud': AppInformation.appName,
};
Log.print('🚀 loginUsingCredentialsWithoutGoogle Request URL: ${AppLink.loginUsingCredentialsWithoutGoogle}');
Log.print('📦 loginUsingCredentialsWithoutGoogle Payload: $payload');
var response = await http.post(
Uri.parse(AppLink.loginUsingCredentialsWithoutGoogle),
body: payload,
);
Log.print('✅ loginUsingCredentialsWithoutGoogle Status Code: ${response.statusCode}');
Log.print('📄 loginUsingCredentialsWithoutGoogle Response Body: ${response.body}');
if (response.statusCode == 200 || response.statusCode == 201) {
var jsonDecoeded = jsonDecode(response.body);
if (jsonDecoeded['status'] == 'success') {
@@ -680,21 +686,25 @@ class LoginDriverController extends GetxController {
Get.off(() => HomeCaptain());
} else {
Log.print('❌ Login failed message: ${jsonDecoeded['message']}');
mySnackbarError(
(jsonDecoeded['message'] ?? 'Login failed').toString().tr);
isloading = false;
update();
}
} else if (response.statusCode == 429) {
Log.print('❌ Too many attempts (429)');
mySnackbarError('Too many attempts. Please wait a minute.'.tr);
isloading = false;
update();
} else {
Log.print('❌ Server error response (Not 200/201/429)');
mySnackbarError('Server error'.tr);
isloading = false;
update();
}
} catch (e) {
Log.print('❌ Network/Exception error: $e');
mySnackbarError('Network error'.tr);
isloading = false;
update();