on wrong token login bug fixed
This commit is contained in:
parent
d906c07a42
commit
37aa23bb8d
|
|
@ -29,13 +29,13 @@ class UserProvider extends CoreProvier {
|
|||
isAuthenticated = true;
|
||||
final RequestService service = RequestService(RequestHelper.userInfo);
|
||||
await service.httpGet();
|
||||
if (service.statusCode == 401 || service.result['user'] == null) {
|
||||
return false;
|
||||
}
|
||||
if (service.isSuccess) {
|
||||
user = User.fromJson(service.result['user']);
|
||||
return true;
|
||||
}
|
||||
if (service.statusCode == 401) {
|
||||
return false;
|
||||
}
|
||||
throw 'Getting user from API failed!';
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue