buildActionUrl("hookCallback")

This commit is contained in:
juano2310
2015-11-04 14:18:46 -05:00
parent bbc680746e
commit ac5f15efd8

View File

@@ -280,8 +280,7 @@ def validateCurrentToken() {
def initialize() {
log.debug "Callback URL - Webhook"
def localServerUrl = getApiServerUrl()
def hookUrl = "${localServerUrl}/api/token/${state.accessToken}/smartapps/installations/${app.id}/hookCallback"
def hookUrl = buildActionUrl("hookCallback")
def webhook = "https://jawbone.com/nudge/api/v.1.1/users/@me/pubsub?webhook=$hookUrl"
httpPost(uri: webhook, headers: ["Authorization": "Bearer ${state.JawboneAccessToken}" ])
}