From ca6de7d9ecac9ed72229756b8eded440fdb76d04 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Sat, 21 Jan 2017 22:07:08 -0500 Subject: [PATCH] pass self to helper --- src/services/apiService.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/services/apiService.js b/src/services/apiService.js index 0434117dc9..de32845035 100644 --- a/src/services/apiService.js +++ b/src/services/apiService.js @@ -342,7 +342,7 @@ function initApiService() { self.tokenService.getToken(function (accessToken) { // handle transferring from old auth bearer if (authBearer && !accessToken) { - postConnectToken({ + postConnectToken(self, { grant_type: 'password', oldAuthBearer: authBearer, scope: 'api offline_access', @@ -364,7 +364,7 @@ function initApiService() { return; } - postConnectToken({ + postConnectToken(self, { grant_type: 'refresh_token', client_id: 'browser', refresh_token: refreshToken @@ -390,7 +390,7 @@ function initApiService() { return deferred.promise } - function postConnectToken(data, success, error) { + function postConnectToken(self, data, success, error) { $.ajax({ type: 'POST', url: self.baseUrl + '/connect/token',