Created
June 15, 2017 11:18
-
-
Save smn/b26008ac67fdde214f16ba0c20714187 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/go-app-ussd_public.js b/go-app-ussd_public.js | |
index 2dc4816..8584a68 100644 | |
--- a/go-app-ussd_public.js | |
+++ b/go-app-ussd_public.js | |
@@ -648,7 +648,10 @@ go.app = function() { | |
return Q(true); | |
} | |
// Otherwise check the API | |
- return new JsonApi(self.im, {'Authorization': 'Token ' + api_token}) | |
+ return new JsonApi(self.im, { | |
+ headers: { | |
+ 'Authorization': 'Token ' + api_token | |
+ }}) | |
.get(api_url, { | |
params: { | |
address: msisdn, | |
diff --git a/src/ussd_public.js b/src/ussd_public.js | |
index 01a958a..a77f9dc 100644 | |
--- a/src/ussd_public.js | |
+++ b/src/ussd_public.js | |
@@ -498,7 +498,10 @@ go.app = function() { | |
return Q(true); | |
} | |
// Otherwise check the API | |
- return new JsonApi(self.im, {'Authorization': 'Token ' + api_token}) | |
+ return new JsonApi(self.im, { | |
+ headers: { | |
+ 'Authorization': ['Token ' + api_token] | |
+ }}) | |
.get(api_url, { | |
params: { | |
address: msisdn, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment