fix logout failed
This commit is contained in:
parent
733a43df07
commit
813b9ea79d
@ -80,13 +80,15 @@ class UserModel {
|
||||
final tag = gFFI.dialogManager.showLoading(translate('Waiting'));
|
||||
try {
|
||||
final url = await bind.mainGetApiServer();
|
||||
final authHeaders = getHttpHeaders();
|
||||
authHeaders['Content-Type'] = "application/json";
|
||||
await http
|
||||
.post(Uri.parse('$url/api/logout'),
|
||||
body: {
|
||||
body: jsonEncode({
|
||||
'id': await bind.mainGetMyId(),
|
||||
'uuid': await bind.mainGetUuid(),
|
||||
},
|
||||
headers: getHttpHeaders())
|
||||
}),
|
||||
headers: authHeaders)
|
||||
.timeout(Duration(seconds: 2));
|
||||
} catch (e) {
|
||||
print("request /api/logout failed: err=$e");
|
||||
|
Loading…
Reference in New Issue
Block a user