diff options
Diffstat (limited to 'lib/models')
-rw-r--r-- | lib/models/user.js | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/models/user.js b/lib/models/user.js index e1a373d6..64173cbd 100644 --- a/lib/models/user.js +++ b/lib/models/user.js @@ -23,6 +23,12 @@ module.exports = function (sequelize, DataTypes) { }, history: { type: DataTypes.TEXT + }, + accessToken: { + type: DataTypes.STRING + }, + refreshToken: { + type: DataTypes.STRING } }, { classMethods: { @@ -63,6 +69,9 @@ module.exports = function (sequelize, DataTypes) { case "github": photo = 'https://avatars.githubusercontent.com/u/' + profile.id + '?s=48'; break; + case "gitlab": + photo = profile.avatarUrl; + break; case "dropbox": //no image api provided, use gravatar photo = 'https://www.gravatar.com/avatar/' + md5(profile.emails[0].value); @@ -72,6 +81,6 @@ module.exports = function (sequelize, DataTypes) { } } }); - + return User; };
\ No newline at end of file |