mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 02:57:22 +00:00
fix login dialog can't pop when api server is invalid
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -133,9 +133,9 @@ class UserModel {
|
||||
}
|
||||
|
||||
static Future<List<dynamic>> queryLoginOptions() async {
|
||||
final url = await bind.mainGetApiServer();
|
||||
final resp = await http.get(Uri.parse('$url/api/login-options'));
|
||||
try {
|
||||
final url = await bind.mainGetApiServer();
|
||||
final resp = await http.get(Uri.parse('$url/api/login-options'));
|
||||
return jsonDecode(resp.body);
|
||||
} catch (e) {
|
||||
print("queryLoginOptions: jsonDecode resp body failed: ${e.toString()}");
|
||||
|
||||
Reference in New Issue
Block a user