mirror of
https://github.com/wgh136/pixes.git
synced 2025-09-27 12:57:24 +00:00
settings
This commit is contained in:
@@ -106,7 +106,14 @@ class Network {
|
||||
},
|
||||
options: Options(
|
||||
contentType: Headers.formUrlEncodedContentType,
|
||||
validateStatus: (i) => true,
|
||||
headers: headers));
|
||||
if(res.statusCode != 200) {
|
||||
var data = res.data ?? "";
|
||||
if(data.contains("Invalid refresh token")) {
|
||||
throw "Failed to refresh token. Plaese logout and re-login";
|
||||
}
|
||||
}
|
||||
var account = Account.fromJson(json.decode(res.data!));
|
||||
appdata.account = account;
|
||||
appdata.writeData();
|
||||
|
Reference in New Issue
Block a user