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