mirror of https://github.com/status-im/codimd.git
Fix user profile photo might not replace to proper size
This commit is contained in:
parent
1ca39d9c8e
commit
2aee0f267c
|
@ -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 New Issue