debug, store user info

Signed-off-by: fufesou <shuanglongchen@yeah.net>
This commit is contained in:
fufesou 2023-06-22 00:54:00 +08:00
parent 54cc45dd66
commit 4f50e3d934
2 changed files with 5 additions and 3 deletions

View File

@ -123,7 +123,6 @@ class LoginResponse {
LoginResponse.fromJson(Map<String, dynamic> json) {
access_token = json['access_token'];
type = json['type'];
print('REMOVE ME ================== $json');
user = json['user'] != null ? UserPayload.fromJson(json['user']) : null;
}
}

View File

@ -1175,8 +1175,11 @@ function check_if_overlay() {
checkConnectStatus();
function set_local_user_info(user) {
var user_info = {name: user.name, status: user.status};
handler.set_local_option("user_info", JSON.stringify(user_info));
var user_info = {name: user.name};
if (user.status) {
user_info.status = user.status;
}
handler.set_local_option("user_info", JSON.stringify(user_info));
}
function login() {