Merge pull request #15 from SyncrowIOT/web_fix_bugs_3

Web fix bugs 3
This commit is contained in:
Abdullah
2024-09-05 09:44:50 +03:00
committed by GitHub
17 changed files with 257 additions and 229 deletions

View File

@ -37,13 +37,17 @@ class AuthenticationAPI {
expectedResponseModel: (json) {
return json['data']['cooldown'];
});
return response;
} on DioException catch (e) {
final errorData = e.response!.data;
String errorMessage = errorData['message'];
print('sendOtp=$errorMessage');
if (e.response != null) {
if (e.response!.statusCode == 400) {
final errorData = e.response!.data;
String errorMessage = errorData['message'];
print('sendOtp=$errorMessage');
if (errorMessage == 'User not found') {
return 1;
} else {