mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
decode json with utf8 from names and show account info
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -41,7 +41,7 @@ class UserModel {
|
||||
reset();
|
||||
return;
|
||||
}
|
||||
final data = json.decode(response.body);
|
||||
final data = json.decode(utf8.decode(response.bodyBytes));
|
||||
final error = data['error'];
|
||||
if (error != null) {
|
||||
throw error;
|
||||
@@ -105,7 +105,7 @@ class UserModel {
|
||||
|
||||
final Map<String, dynamic> body;
|
||||
try {
|
||||
body = jsonDecode(resp.body);
|
||||
body = jsonDecode(utf8.decode(resp.bodyBytes));
|
||||
} catch (e) {
|
||||
print("login: jsonDecode resp body failed: ${e.toString()}");
|
||||
rethrow;
|
||||
|
||||
Reference in New Issue
Block a user