@@ -21,22 +21,11 @@ export async function run(projectId: string) {
2121 let profile : ProfileInterfaces . Profile = await profileApiObject . createProfile ( createProfileContext , false ) ;
2222 console . log ( 'Profile created for' , profile . coreAttributes . DisplayName . value ) ;
2323
24- common . heading ( 'Update the profile' ) ;
25- const email = profile . coreAttributes . UnconfirmedEmailAddress . value ;
26- profile . coreAttributes . UnconfirmedEmailAddress . value = 'Changed@microsoft.com' ;
27- await profileApiObject . updateProfile ( profile , profile . id ) ;
28- profile = await profileApiObject . getProfile ( profile . id , true , true ) ;
29- console . log ( 'Profile now has email' , profile . coreAttributes . UnconfirmedEmailAddress . value ) ;
30- console . log ( 'Reverting name' ) ;
31- profile . coreAttributes . UnconfirmedEmailAddress . value = email ;
32- await profileApiObject . updateProfile ( profile , profile . id ) ;
33- console . log ( 'Profile email reverted to' , profile . coreAttributes . UnconfirmedEmailAddress . value ) ;
34-
3524 common . heading ( 'Get the avatar' ) ;
3625 const avatar : ProfileInterfaces . Avatar = await profileApiObject . getAvatar ( profile . id ) ;
3726 console . log ( "Avatar value:" , avatar . value ) ;
3827
3928 common . heading ( 'Get region information' ) ;
4029 const regions : ProfileInterfaces . ProfileRegions = await profileApiObject . getRegions ( ) ;
4130 console . log ( `There are ${ regions . regions . length } regions found including regions like ${ regions . regions [ 0 ] . name } ` ) ;
42- }
31+ }
0 commit comments