fix(dialyzer): some bad type specs

This commit is contained in:
Shawn 2022-03-11 18:33:08 +08:00
parent 590fa1b375
commit 0b4b3a7cf0
2 changed files with 2 additions and 2 deletions

View File

@ -86,7 +86,7 @@ api_spec() ->
paths() -> ["/rule_events", "/rule_test", "/rules", "/rules/:id"].
error_schema(Code, Message) when is_atom(Code) ->
emqx_dashboard_swagger:error_codes([Code], Message).
emqx_dashboard_swagger:error_codes([Code], list_to_binary(Message)).
rule_creation_schema() ->
ref(emqx_rule_api_schema, "rule_creation").

View File

@ -22,7 +22,7 @@
, get_selected_data/3
]).
-spec test(#{sql := binary(), context := map()}) -> {ok, map() | list()} | {error, nomatch}.
-spec test(#{sql := binary(), context := map()}) -> {ok, map() | list()} | {error, term()}.
test(#{sql := Sql, context := Context}) ->
case emqx_rule_sqlparser:parse(Sql) of
{ok, Select} ->