mirror of
https://github.com/rustdesk/rustdesk.git
synced 2024-11-25 13:19:04 +08:00
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