mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-21 02:35:23 -04:00
Profile.emails is now a string array 🏷️
Dropbox wrapped their email attribute in another object. We now unwrap this object in the DropboxMiddleware and don't need to special-case the email attribute in User.parsePhotoByProfile and the Profile type anymore. Signed-off-by: David Mehren <dmehren1@gmail.com>
This commit is contained in:
parent
9c720183aa
commit
08655f06f9
2 changed files with 14 additions and 3 deletions
|
@ -36,7 +36,7 @@ export type Profile = {
|
|||
id: string;
|
||||
username: string;
|
||||
displayName: string;
|
||||
emails: any[];
|
||||
emails: string[];
|
||||
avatarUrl: string;
|
||||
profileUrl: string;
|
||||
provider: ProviderEnum;
|
||||
|
@ -125,7 +125,7 @@ export class User extends Model<User> {
|
|||
}
|
||||
break
|
||||
case ProviderEnum.dropbox:
|
||||
photo = generateAvatarURL('', profile.emails[0].value, bigger)
|
||||
photo = generateAvatarURL('', profile.emails[0], bigger)
|
||||
break
|
||||
case ProviderEnum.google:
|
||||
photo = profile.photos[0].value
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue