fix
This commit is contained in:
parent
8ec8b054df
commit
b0e5cbc0cd
@ -168,7 +168,7 @@ make_endpoint([{<<"config">>, #{<<"protocol">> := <<"mqtt">>, <<"args">> := #{<<
|
||||
make_endpoint(Params, Endpoint#endpoint{config = #mqtt_endpoint{host = Host, port = Port, username = Username, password = Password, topic = Topic, qos = Qos}});
|
||||
|
||||
%% mysql的支持
|
||||
make_endpoint([{<<"config">>, #{<<"protocol">> := <<"mysql">>, <<"args">> := #{<<"host">> := Host, <<"port">> := Port, <<"username">> := Username, <<"password">> := Password, <<"databse">> := Database, <<"table_name">> := TableName}}} | Params], Endpoint) ->
|
||||
make_endpoint([{<<"config">>, #{<<"protocol">> := <<"mysql">>, <<"args">> := #{<<"host">> := Host, <<"port">> := Port, <<"username">> := Username, <<"password">> := Password, <<"database">> := Database, <<"table_name">> := TableName}}} | Params], Endpoint) ->
|
||||
if
|
||||
not is_binary(Username) orelse Username =:= <<>> ->
|
||||
throw("username is invalid");
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user