mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-31 17:38:48 +00:00
test refactoring
This commit is contained in:
@@ -38,7 +38,7 @@ export class BpmUserService {
|
||||
*/
|
||||
getCurrentUserInfo(): Observable<BpmUserModel> {
|
||||
if ( this.authService.isBpmLoggedIn() ) {
|
||||
return Observable.fromPromise(this.authService.getAlfrescoApi().activiti.profileApi.getProfilePicture())
|
||||
return Observable.fromPromise(this.authService.getAlfrescoApi().activiti.profileApi.getProfile())
|
||||
.map(
|
||||
(data) => <BpmUserModel> data
|
||||
)
|
||||
@@ -48,7 +48,7 @@ export class BpmUserService {
|
||||
|
||||
getCurrentUserProfileImage(): Observable<any> {
|
||||
if ( this.authService.isBpmLoggedIn() ) {
|
||||
return Observable.fromPromise(this.authService.getAlfrescoApi().activiti.profileApi.getProfile())
|
||||
return Observable.fromPromise(this.callGetProfilePictureApi())
|
||||
.map(
|
||||
(data) => data
|
||||
)
|
||||
@@ -56,6 +56,10 @@ export class BpmUserService {
|
||||
}
|
||||
}
|
||||
|
||||
callGetProfilePictureApi() {
|
||||
return this.authService.getAlfrescoApi().activiti.profileApi.getProfilePicture();
|
||||
}
|
||||
|
||||
/**
|
||||
* Throw the error
|
||||
* @param error
|
||||
|
Reference in New Issue
Block a user