fix: query_by_clientid with v0.7 sql api

This commit is contained in:
Dennis Zhuang 2024-03-22 17:09:23 -07:00
parent 1fcd06f4bc
commit ef0fee52f4
1 changed files with 1 additions and 2 deletions

View File

@ -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">> := #{