forget password changes & bugs number 10 & 15-18

This commit is contained in:
mohammad
2024-09-02 10:16:28 +03:00
parent 3ff6937116
commit ddcdd4891a
12 changed files with 180 additions and 160 deletions

View File

@ -25,7 +25,9 @@ class AuthenticationAPI {
path: ApiEndpoints.forgetPassword,
body: {"email": email, "password": password},
showServerMessage: true,
expectedResponseModel: (json) {});
expectedResponseModel: (json) {
print('json=$json');
});
return response;
}
@ -66,7 +68,6 @@ class AuthenticationAPI {
}
static Future verifyOtp({required String email, required String otpCode}) async {
try {
final response = await HTTPService().post(
path: ApiEndpoints.verifyOtp,
body: {"email": email, "type": "PASSWORD", "otpCode": otpCode},
@ -79,17 +80,7 @@ class AuthenticationAPI {
}
});
return response;
} on DioException catch (e) {
if (e.response != null) {
if (e.response!.statusCode == 400) {
final errorData = e.response!.data;
String errorMessage = errorData['message'];
return errorMessage;
}
} else {
debugPrint('Error: ${e.message}');
}
}
}
static Future<List<RegionModel>> fetchRegion() async {