mirror of
https://github.com/rustdesk/rustdesk.git
synced 2025-12-12 11:06:57 +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 {
|
static Future<List<dynamic>> queryLoginOptions() async {
|
||||||
final url = await bind.mainGetApiServer();
|
|
||||||
final resp = await http.get(Uri.parse('$url/api/login-options'));
|
|
||||||
try {
|
try {
|
||||||
|
final url = await bind.mainGetApiServer();
|
||||||
|
final resp = await http.get(Uri.parse('$url/api/login-options'));
|
||||||
return jsonDecode(resp.body);
|
return jsonDecode(resp.body);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
print("queryLoginOptions: jsonDecode resp body failed: ${e.toString()}");
|
print("queryLoginOptions: jsonDecode resp body failed: ${e.toString()}");
|
||||||
|
|||||||
Reference in New Issue
Block a user