cancel
Showing results for 
Search instead for 
Did you mean: 

how to use people service of adf for update getAvatarImage(personId: string, opts?: any)

ahirrekha
Champ in-the-making
Champ in-the-making

HI ,@eromano  and @DenysVuika

how to use people service of adf for update getAvatarImage(personId: string, opts?: any) ,it will give error when we run project that "Cannot read property 'callApi' of undefined
at PeopleApi.push../node_modules/@alfresco/js-api/_esm5/src/api/content-rest-api/api/people.api.js.PeopleApi.getAvatarImage"

so in debug i found "return this.apiClient.callApi('/people/{personId}/avatar', 'GET', pathParams, queryParams, headerParams, formParams, postBody, contentTypes, accepts);"  that this.apiClient is undefined .

or any other service is available to get and update image (avatar) of user in adf...

HERE link is available for document https://github.com/Alfresco/alfresco-js-api/blob/develop/src/api/content-rest-api/api/people.api.ts

please give the guidence that how we can use these methods.

Regards,
Rekha | ContCentric
Alfresco Enterprise Content & Document Management System Company
http://www.contcentric.com
1 REPLY 1

sanjaybandhaniya
Elite Collaborator
Elite Collaborator

Hi,

Try Below Service.

 constructor(private userService:EcmUserService) {
                this.userService.peopleApi.updateAvatarImage();
                this.userService.peopleApi.getAvatarImage()
            
   
  }