mirror of
https://github.com/DefinedNet/mobile_nebula.git
synced 2025-09-06 03:06:04 +00:00
Default hostmaps to []
This commit is contained in:
parent
38389e99d4
commit
d9f4b8b56d
1 changed files with 6 additions and 0 deletions
|
@ -206,6 +206,9 @@ class Site {
|
||||||
Future<List<HostInfo>> listHostmap() async {
|
Future<List<HostInfo>> listHostmap() async {
|
||||||
try {
|
try {
|
||||||
var ret = await platform.invokeMethod("active.listHostmap", <String, String>{"id": id});
|
var ret = await platform.invokeMethod("active.listHostmap", <String, String>{"id": id});
|
||||||
|
if (ret == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
List<dynamic> f = jsonDecode(ret);
|
List<dynamic> f = jsonDecode(ret);
|
||||||
List<HostInfo> hosts = [];
|
List<HostInfo> hosts = [];
|
||||||
|
@ -226,6 +229,9 @@ class Site {
|
||||||
Future<List<HostInfo>> listPendingHostmap() async {
|
Future<List<HostInfo>> listPendingHostmap() async {
|
||||||
try {
|
try {
|
||||||
var ret = await platform.invokeMethod("active.listPendingHostmap", <String, String>{"id": id});
|
var ret = await platform.invokeMethod("active.listPendingHostmap", <String, String>{"id": id});
|
||||||
|
if (ret == null) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
|
|
||||||
List<dynamic> f = jsonDecode(ret);
|
List<dynamic> f = jsonDecode(ret);
|
||||||
List<HostInfo> hosts = [];
|
List<HostInfo> hosts = [];
|
||||||
|
|
Loading…
Add table
Reference in a new issue