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:
David Mehren 2020-05-16 15:52:11 +02:00
parent 9c720183aa
commit 08655f06f9
No known key found for this signature in database
GPG key ID: 6017AF117F9756CB
2 changed files with 14 additions and 3 deletions

View file

@ -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