Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

Commit 2f6c34b

Browse files
author
vikasrohit
committed
SUP-2095, [Edit Profile] Implement linking/unlinking Bitbucket account
-- Added BitBucket support -- Replaced followings count with repos count
1 parent 048245c commit 2f6c34b

File tree

3 files changed

+8
-4
lines changed

3 files changed

+8
-4
lines changed

app/directives/external-account/external-link-data.directive.jade

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,8 +75,8 @@
7575
.value {{(account.data.followers|number:0) || 0}}
7676
.key followers
7777
li
78-
.value {{(account.data.followings|number:0) || 0}}
79-
.key followings
78+
.value {{(account.data.repos|number:0) || 0}}
79+
.key repositories
8080

8181
div(ng-switch-when="twitter")
8282
.handle @{{account.data.handle}}

app/services/externalAccounts.service.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,9 @@
9999
accessToken: socialData.accessToken
100100
}
101101
};
102+
if (socialData.accessTokenSecret) {
103+
postData.context.accessTokenSecret = socialData.accessTokenSecret;
104+
}
102105
$log.debug("link API postdata: " + JSON.stringify(postData));
103106
var api = ApiService.restangularV3;
104107
api.one('users', user.userId).customPOST(postData, "profiles", {}, {})

app/services/helpers.service.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,10 @@
8989
}
9090

9191
var token = accessToken;
92+
var tokenSecret = null;
9293
if (profile.identities && profile.identities.length > 0) {
9394
token = profile.identities[0].access_token;
94-
console.log(profile.identities[0]);
95+
tokenSecret = profile.identities[0].access_token_secret;
9596
}
9697
return {
9798
socialUserId: socialUserId,
@@ -102,7 +103,7 @@
102103
socialProfile: profile,
103104
socialProvider: socialProvider,
104105
accessToken: token,
105-
refreshToken: refreshToken
106+
accessTokenSecret : tokenSecret
106107
}
107108
}
108109

0 commit comments

Comments
 (0)