mirror of
https://git.meshkee.com/applications/cssd.git
synced 2026-10-12 23:48:55 +03:30
1.7.0
This commit is contained in:
+6
-12
@@ -62,12 +62,10 @@ class Auth with ChangeNotifier {
|
||||
// return 'Done';
|
||||
// }
|
||||
print(responseData);
|
||||
if (responseData['status']=='Faild') {
|
||||
if (responseData['status'] == 'Faild') {
|
||||
return 'wrong';
|
||||
}
|
||||
else{
|
||||
return responseData['access_token'];
|
||||
|
||||
} else {
|
||||
return responseData['access_token'];
|
||||
}
|
||||
}
|
||||
|
||||
@@ -81,10 +79,7 @@ class Auth with ChangeNotifier {
|
||||
'password': password,
|
||||
'password_confirmation': password,
|
||||
},
|
||||
headers: {
|
||||
'Authorization': token,
|
||||
'X-Requested-With': 'XMLHttpRequest'
|
||||
},
|
||||
headers: {'Authorization': token, 'X-Requested-With': 'XMLHttpRequest'},
|
||||
// headers: {'X-Requested-With': 'XMLHttpRequest'},
|
||||
);
|
||||
final responseData = json.decode(response.body);
|
||||
@@ -94,10 +89,9 @@ class Auth with ChangeNotifier {
|
||||
// return 'Done';
|
||||
// }
|
||||
print(responseData);
|
||||
if (responseData['status']=='Success') {
|
||||
if (responseData['status'] == 'Success') {
|
||||
return 'done';
|
||||
}
|
||||
else{
|
||||
} else {
|
||||
return 'error';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user