Skip to content

Commit

Permalink
KAZOO-3329: get the services using the props module
Browse files Browse the repository at this point in the history
  • Loading branch information
k-anderson committed Feb 12, 2015
1 parent 6f1a1e9 commit 07b4eba
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions applications/crossbar/src/modules_v2/cb_phone_numbers_v2.erl
Original file line number Diff line number Diff line change
Expand Up @@ -1125,8 +1125,12 @@ set_response(_Else, _, Context, _) ->
%%--------------------------------------------------------------------
-spec dry_run_response(wh_proplist()) -> wh_json:object().
-spec dry_run_response(ne_binary(), wh_json:object()) -> wh_json:object().
dry_run_response([{'services', Services}]) ->
wh_services:dry_run(Services).
dry_run_response(Props) ->
case props:get_value('services', Props) of
'undefined' -> wh_json:new();
Services ->
wh_services:dry_run(Services)
end.

dry_run_response(?COLLECTION, JObj) ->
case wh_json:get_value(<<"error">>, JObj) of
Expand Down

0 comments on commit 07b4eba

Please sign in to comment.