buildActionUrl("hookCallback")

This commit is contained in:
juano2310
2015-11-04 14:18:46 -05:00
committed by Yaima Valdivia
parent 61398105d1
commit 4e203e8e13

View File

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