mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-22 01:36:29 -05:00
Fix user profile photo might not replace to proper size
This commit is contained in:
parent
1ca39d9c8e
commit
2aee0f267c
1 changed files with 4 additions and 4 deletions
|
@ -105,8 +105,8 @@ module.exports = function (sequelize, DataTypes) {
|
|||
break;
|
||||
case "gitlab":
|
||||
photo = profile.avatarUrl;
|
||||
if (bigger) photo.replace(/(\?s=)\d*$/i, '$1400');
|
||||
else photo.replace(/(\?s=)\d*$/i, '$196');
|
||||
if (bigger) photo = photo.replace(/(\?s=)\d*$/i, '$1400');
|
||||
else photo = photo.replace(/(\?s=)\d*$/i, '$196');
|
||||
break;
|
||||
case "dropbox":
|
||||
//no image api provided, use gravatar
|
||||
|
@ -116,8 +116,8 @@ module.exports = function (sequelize, DataTypes) {
|
|||
break;
|
||||
case "google":
|
||||
photo = profile.photos[0].value;
|
||||
if (bigger) photo.replace(/(\?sz=)\d*$/i, '$1400');
|
||||
else photo.replace(/(\?sz=)\d*$/i, '$196');
|
||||
if (bigger) photo = photo.replace(/(\?sz=)\d*$/i, '$1400');
|
||||
else photo = photo.replace(/(\?sz=)\d*$/i, '$196');
|
||||
break;
|
||||
case "ldap":
|
||||
//no image api provided,
|
||||
|
|
Loading…
Reference in a new issue