summaryrefslogtreecommitdiff
path: root/src/api
diff options
context:
space:
mode:
authorsyuilo <syuilotan@yahoo.co.jp>2017-01-21 17:25:12 +0900
committersyuilo <syuilotan@yahoo.co.jp>2017-01-21 17:25:12 +0900
commit11c8d05e7d83dbde01d6632255120696773a32b5 (patch)
treef99438579c0a573784ddcc2b8a0c73e1b70e496d /src/api
parent:v: (diff)
downloadsharkey-11c8d05e7d83dbde01d6632255120696773a32b5.tar.gz
sharkey-11c8d05e7d83dbde01d6632255120696773a32b5.tar.bz2
sharkey-11c8d05e7d83dbde01d6632255120696773a32b5.zip
:v:
Diffstat (limited to 'src/api')
-rw-r--r--src/api/serializers/user.ts4
-rw-r--r--src/api/service/twitter.ts7
2 files changed, 8 insertions, 3 deletions
diff --git a/src/api/serializers/user.ts b/src/api/serializers/user.ts
index d9dd4af7ca..945c01d258 100644
--- a/src/api/serializers/user.ts
+++ b/src/api/serializers/user.ts
@@ -65,8 +65,8 @@ export default (
delete _user.token;
delete _user.username_lower;
if (_user.twitter) {
- delete _user.twitter.accessToken;
- delete _user.twitter.accessTokenSecret;
+ delete _user.twitter.access_token;
+ delete _user.twitter.access_token_secret;
}
// Visible via only the official client
diff --git a/src/api/service/twitter.ts b/src/api/service/twitter.ts
index 9891ddd64c..2d97a26dcf 100644
--- a/src/api/service/twitter.ts
+++ b/src/api/service/twitter.ts
@@ -38,7 +38,12 @@ module.exports = (app: express.Application) => {
token: res.locals.user
}, {
$set: {
- twitter: result
+ twitter: {
+ access_token: result.accessToken,
+ access_token_secret: result.accessTokenSecret,
+ user_id: result.userId,
+ screen_name: result.screenName
+ }
}
});