mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-11 22:38:54 +03:30
Set Pass Screen
This commit is contained in:
@@ -82,7 +82,8 @@ class Auth with ChangeNotifier {
|
||||
}
|
||||
}
|
||||
|
||||
Future<String> sendRePass(String password, String token) async {
|
||||
Future<String> sendRePass(
|
||||
String password, String passwordConfirmation, String token) async {
|
||||
print(password);
|
||||
print(token);
|
||||
|
||||
@@ -90,9 +91,12 @@ class Auth with ChangeNotifier {
|
||||
Uri.parse(Url.sendResetPass),
|
||||
body: {
|
||||
'password': password,
|
||||
'password_confirmation': password,
|
||||
'password_confirmation': passwordConfirmation,
|
||||
},
|
||||
headers: {
|
||||
'Authorization': User.token,
|
||||
// 'X-Requested-With': 'XMLHttpRequest',
|
||||
},
|
||||
headers: {'Authorization': token, 'X-Requested-With': 'XMLHttpRequest'},
|
||||
// headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
);
|
||||
final responseData = json.decode(response.body);
|
||||
@@ -102,7 +106,8 @@ class Auth with ChangeNotifier {
|
||||
// return 'Done';
|
||||
// }
|
||||
print(responseData);
|
||||
if (responseData['status'] == 'Success') {
|
||||
if (responseData['status'] == 'Success' &&
|
||||
responseData['message'] == 'Success Change Password') {
|
||||
return 'done';
|
||||
} else {
|
||||
return 'error';
|
||||
|
||||
Reference in New Issue
Block a user