fix handler

This commit is contained in:
anlicheng 2023-03-12 23:27:23 +08:00
parent 8aa2e3b08f
commit 05ed086bc3
3 changed files with 4 additions and 3 deletions

View File

@ -100,7 +100,7 @@ handle_request("GET", "/host/detail", #{<<"id">> := HostId}, _) ->
end
end, DeployList),
HostInfo3 = maps:put(<<"deploy_list">>, HostInfo2, DeployList1),
HostInfo3 = maps:put(<<"deploy_list">>, DeployList1, HostInfo2),
{ok, 200, iot_util:json_data(HostInfo3)}
end;

View File

@ -36,7 +36,8 @@ insert_hosts() ->
host_id = integer_to_binary(Id0),
name = <<"N1000_0001">>,
model = <<"N1000">>,
cell_id = rand:uniform(100)
cell_id = rand:uniform(100),
status = 1
},
host_model:add_host(Host)

View File

@ -5,7 +5,7 @@
+K true
+A30
-mnesia dir '"/tmp/iot"'
-mnesia dir '"//usr/local/code/data/iot"'
-mnesia dump_log_write_threshold 50000
-mnesia dc_dump_limit 40