mirror of
https://github.com/SyncrowIOT/web.git
synced 2025-07-10 07:07:19 +00:00
@ -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 {
|
||||
|
Reference in New Issue
Block a user