fix: query_by_clientid with v0.7 sql api
This commit is contained in:
parent
1fcd06f4bc
commit
ef0fee52f4
|
@ -324,7 +324,7 @@ query_by_clientid(Topic, ClientId, Config) ->
|
||||||
{"Content-Type", "application/x-www-form-urlencoded"}
|
{"Content-Type", "application/x-www-form-urlencoded"}
|
||||||
],
|
],
|
||||||
Body = <<"sql=select * from \"", Topic/binary, "\" where clientid='", ClientId/binary, "'">>,
|
Body = <<"sql=select * from \"", Topic/binary, "\" where clientid='", ClientId/binary, "'">>,
|
||||||
{ok, 200, _Headers, RawBody0} =
|
{ok, _, _Headers, RawBody0} =
|
||||||
ehttpc:request(
|
ehttpc:request(
|
||||||
EHttpcPoolName,
|
EHttpcPoolName,
|
||||||
post,
|
post,
|
||||||
|
@ -335,7 +335,6 @@ query_by_clientid(Topic, ClientId, Config) ->
|
||||||
|
|
||||||
case emqx_utils_json:decode(RawBody0, [return_maps]) of
|
case emqx_utils_json:decode(RawBody0, [return_maps]) of
|
||||||
#{
|
#{
|
||||||
<<"code">> := 0,
|
|
||||||
<<"output">> := [
|
<<"output">> := [
|
||||||
#{
|
#{
|
||||||
<<"records">> := #{
|
<<"records">> := #{
|
||||||
|
|
Loading…
Reference in New Issue