Skip to content
Browse files

WHISTLE-42: hot fix for provisioner_util

  • Loading branch information...
1 parent 024da15 commit ab618a86c5f9ecbd44737d157e8b184234058048 Jon Blanton committed May 30, 2012
Showing with 2 additions and 2 deletions.
  1. +2 −2 whistle_apps/apps/crossbar/src/modules/provisioner_util.erl
View
4 whistle_apps/apps/crossbar/src/modules/provisioner_util.erl
@@ -213,8 +213,8 @@ set_device_overrides(#cb_context{doc=Device}) ->
-spec send_provisioning_request/2 :: (wh_json:json_object(), ne_binary()) -> 'ok'.
send_provisioning_request(Template, MACAddress) ->
ProvisionRequest = wh_json:encode(Template),
- Url = whapps_config:get_string(?MOD_CONFIG_CAT, <<"provisioning_url">>),
- UrlString = lists:flatten([Url, MACAddress]),
+ UrlTmpl = whapps_config:get_string(?MOD_CONFIG_CAT, <<"provisioning_url">>),
+ UrlString = re:replace(UrlTmpl, "{{mac_address}}", MACAddress, [global, {return, list}]),
Headers = [KV || {_, V}=KV <- [{"Content-Type", "application/json"}
,{"Host", whapps_config:get_string(?MOD_CONFIG_CAT, <<"provisioner_host">>)}
,{"Referer", whapps_config:get_string(?MOD_CONFIG_CAT, <<"provisioner_referer">>)}

0 comments on commit ab618a8

Please sign in to comment.
Something went wrong with that request. Please try again.