fix(connector): keep connector name type as binary don't convert it to atom

After investigation, it was confirmed that there was no need to convert the connector name to atom
This commit is contained in:
firest 2022-11-01 15:36:31 +08:00
parent 6c52d5de1f
commit d0687c7aaa
1 changed files with 2 additions and 1 deletions

View File

@ -78,9 +78,10 @@ connector_id(Type0, Name0) ->
Name = bin(Name0),
<<Type/binary, ":", Name/binary>>.
-spec parse_connector_id(binary() | list() | atom()) -> {atom(), binary()}.
parse_connector_id(ConnectorId) ->
case string:split(bin(ConnectorId), ":", all) of
[Type, Name] -> {binary_to_atom(Type, utf8), binary_to_atom(Name, utf8)};
[Type, Name] -> {binary_to_atom(Type, utf8), Name};
_ -> error({invalid_connector_id, ConnectorId})
end.