Skip to content

Commit

Permalink
unlinkUrl is now correctly concatenated with baseUrl
Browse files Browse the repository at this point in the history
  • Loading branch information
sahat committed Jun 1, 2015
1 parent 26f8ef3 commit f440efb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
9 changes: 6 additions & 3 deletions satellizer.js
Original file line number Diff line number Diff line change
Expand Up @@ -374,10 +374,11 @@
'$q',
'$http',
'satellizer.config',
'satellizer.utils',
'satellizer.shared',
'satellizer.Oauth1',
'satellizer.Oauth2',
function($q, $http, config, shared, Oauth1, Oauth2) {
function($q, $http, config, utils, shared, Oauth1, Oauth2) {
var oauth = {};

oauth.authenticate = function(name, redirect, userData) {
Expand All @@ -397,10 +398,12 @@
};

oauth.unlink = function(provider) {
var unlinkUrl = config.baseUrl ? utils.joinUrl(config.baseUrl, config.unlinkUrl) : config.unlinkUrl;

if (config.unlinkMethod === 'get') {
return $http.get(config.unlinkUrl + provider);
return $http.get(unlinkUrl + provider);
} else if (config.unlinkMethod === 'post') {
return $http.post(config.unlinkUrl, provider);
return $http.post(unlinkUrl, provider);
}
};

Expand Down
Loading

0 comments on commit f440efb

Please sign in to comment.