fix: don't require path in http action(fill default path)
This commit is contained in:
parent
4fc14fb4ba
commit
cd1365d753
|
@ -67,7 +67,7 @@ connector_action_config_to_bridge_v1_config(ConnectorConfig, ActionConfig) ->
|
|||
}.
|
||||
|
||||
bridge_v1_config_to_connector_config(BridgeV1Conf) ->
|
||||
%% To statisfy the emqx_bridge_api_SUITE:t_http_crud_apis/1
|
||||
%% To satisfy the emqx_bridge_api_SUITE:t_http_crud_apis/1
|
||||
ok = validate_webhook_url(maps:get(<<"url">>, BridgeV1Conf, undefined)),
|
||||
maps:without(?REMOVED_KEYS ++ ?ACTION_KEYS ++ ?PARAMETER_KEYS, BridgeV1Conf).
|
||||
|
||||
|
|
|
@ -565,12 +565,8 @@ preprocess_request(undefined) ->
|
|||
undefined;
|
||||
preprocess_request(Req) when map_size(Req) == 0 ->
|
||||
undefined;
|
||||
preprocess_request(
|
||||
#{
|
||||
method := Method,
|
||||
path := Path
|
||||
} = Req
|
||||
) ->
|
||||
preprocess_request(#{method := Method} = Req) ->
|
||||
Path = maps:get(path, Req, <<>>),
|
||||
Headers = maps:get(headers, Req, []),
|
||||
#{
|
||||
method => parse_template(to_bin(Method)),
|
||||
|
|
Loading…
Reference in New Issue