This commit is contained in:
anlicheng 2023-06-26 10:29:38 +08:00
parent e0262dff73
commit 6cd70bc7ad

View File

@ -78,7 +78,10 @@ handle_request("POST", "/host/publish_command", _,
<<"ts">> => iot_util:current_time(),
<<"m">> => iolist_to_binary(jiffy:encode(Params, [force_utf8]))
},
BinReply = iolist_to_binary(jiffy:encode(append_service_name(PostParams, Reply), [force_utf8])),
Reply1 = append_service_name(PostParams, Reply),
lager:debug("[http_host_handler] publish message is: ~p", [Reply1]),
BinReply = iolist_to_binary(jiffy:encode(Reply1, [force_utf8])),
case iot_host:aes_encode(Pid, CommandType, BinReply) of
{error, Reason} when is_binary(Reason) ->