Skip to content

Commit

Permalink
PISTON-506: keep Account-ID in webhooks-parking hook data (2600hz#4378)
Browse files Browse the repository at this point in the history
PISTON-506: keep format function arity
  • Loading branch information
danielfinke authored and jamesaimonetti committed Dec 20, 2017
1 parent 0f7b51f commit 6ac00bf
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion applications/webhooks/src/modules/webhooks_parking.erl
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ maybe_send_event(AccountId, JObj) ->
%%--------------------------------------------------------------------
-spec format(kz_json:object()) -> kz_json:object().
format(JObj) ->
AccountId = kz_json:get_ne_binary_value([<<"Custom-Channel-Vars">>, <<"Account-ID">>], JObj),
JObj1 = kz_json:set_value(<<"Account-ID">>, AccountId, JObj),
RemoveKeys = [
<<"Node">>
,<<"Msg-ID">>
Expand All @@ -91,4 +93,4 @@ format(JObj) ->
,<<"Event-Category">>
,<<"Custom-Channel-Vars">>
],
kz_json:normalize_jobj(JObj, RemoveKeys, []).
kz_json:normalize_jobj(JObj1, RemoveKeys, []).

0 comments on commit 6ac00bf

Please sign in to comment.