From 0174f6d703481e670ac60cbd9e4c5f1d91fc3dcf Mon Sep 17 00:00:00 2001 From: rustdesk Date: Tue, 20 Jun 2023 23:53:08 +0800 Subject: [PATCH] the guys never handle error --- src/ui/index.tis | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/ui/index.tis b/src/ui/index.tis index d420344cd..76fa845c0 100644 --- a/src/ui/index.tis +++ b/src/ui/index.tis @@ -1242,9 +1242,9 @@ function on_email_check(last_msg) { var url = handler.get_api_server(); httpRequest(url + "/api/login", #post, {username: last_msg.user.name, id: my_id, uuid: handler.get_uuid(), type: 'email_code', trustThisDevice: false, verificationCode: code, deviceInfo: getDeviceInfo()}, function(data) { - if (data.type != 'access_token') { + if (data.error) { abLoading = false; - show_progress(false, "Failed, bad response from server."); + show_progress(false, data.error); return; } handler.set_local_option("access_token", data.access_token); @@ -1325,4 +1325,4 @@ function getDeviceInfo() { type: 'client', name: handler.get_hostname() }; -} \ No newline at end of file +}