Skip to content

Commit

Permalink
DOC-51: validate using the right schema
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesaimonetti committed Apr 8, 2016
1 parent 8215ddc commit 04019c9
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions applications/crossbar/src/modules/cb_ips.erl
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
%%%-------------------------------------------------------------------
%%% @copyright (C) 2011-2015, 2600Hz INC
%%% @copyright (C) 2011-2016, 2600Hz INC
%%% @doc
%%%
%%%
Expand Down Expand Up @@ -266,13 +266,13 @@ load_ip(Context, Id) ->
-spec maybe_assign_ips(cb_context:context()) -> cb_context:context().
maybe_assign_ips(Context) ->
OnSuccess = fun validate_ips_not_in_use/1,
cb_context:validate_request_data(<<"webhooks">>, Context, OnSuccess).
cb_context:validate_request_data(<<"ips">>, Context, OnSuccess).

-spec validate_ips_not_in_use(cb_context:context()) -> cb_context:context().
-spec validate_ips_not_in_use(cb_context:context(), ne_binaries()) -> cb_context:context().
validate_ips_not_in_use(Context) ->
validate_ips_not_in_use(Context
,cb_context:req_data(Context, <<"ips">>, [])
,cb_context:req_value(Context, <<"ips">>)
).

validate_ips_not_in_use(Context, IPs) ->
Expand Down

0 comments on commit 04019c9

Please sign in to comment.