forked from eatvio/eatvio_app
fix: Issue-514 and Issue-497
This commit is contained in:
@@ -38,4 +38,36 @@ class SettingsRepository {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> sendEmailCodeForPasswordChange(String email) async {
|
||||
try {
|
||||
return await settingsService.sendEmailCodeForPasswordChange(
|
||||
data: {
|
||||
'email': email,
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
|
||||
Future<void> confirmPasswordChange(
|
||||
String code,
|
||||
String password,
|
||||
String passwordConfirmation,
|
||||
String email,
|
||||
) async {
|
||||
try {
|
||||
return await settingsService.confirmPasswordChange(
|
||||
data: {
|
||||
'code': code,
|
||||
'password': password,
|
||||
'password_confirmation': passwordConfirmation,
|
||||
'email': email,
|
||||
},
|
||||
);
|
||||
} catch (e) {
|
||||
rethrow;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -21,4 +21,14 @@ abstract class SettingsService {
|
||||
Future<ProfileDetailsModel> updateProfileDetails({
|
||||
@Body() required Map<String, dynamic> data,
|
||||
});
|
||||
|
||||
@POST('/api/send_password_reset_code')
|
||||
Future<void> sendEmailCodeForPasswordChange({
|
||||
@Body() required Map<String, dynamic> data,
|
||||
});
|
||||
|
||||
@POST('/api/confirm_password_reset_code')
|
||||
Future<void> confirmPasswordChange({
|
||||
@Body() required Map<String, dynamic> data,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user