1
0
mirror of https://gitlab.com/comunic/comunicapiv2 synced 2024-11-26 07:19:23 +00:00

Fix issue

This commit is contained in:
Pierre HUBERT 2020-01-01 11:33:51 +01:00
parent fed23994fa
commit f51a20f0e4
2 changed files with 7 additions and 1 deletions

View File

@ -75,7 +75,7 @@ export class UserController {
"lastName": user.lastName, "lastName": user.lastName,
"publicPage": user.pageStatus == UserPageStatus.PUBLIC, "publicPage": user.pageStatus == UserPageStatus.PUBLIC,
"openPage": user.pageStatus == UserPageStatus.OPEN, "openPage": user.pageStatus == UserPageStatus.OPEN,
"virtualDirectory": user.virtualDirectory, "virtualDirectory": user.hasVirtualDirectory ? user.virtualDirectory : "",
"accountImage": this.GetAccountImageURL(user.accountImage, h) "accountImage": this.GetAccountImageURL(user.accountImage, h)
}; };

View File

@ -69,6 +69,12 @@ export class User implements UserBuilder {
} }
} }
get hasVirtualDirectory() : boolean {
return this.virtualDirectory != null
&& this.virtualDirectory != "null"
&& this.virtualDirectory.length > 0
}
get hasWebsite() : boolean { get hasWebsite() : boolean {
return this.personnalWebsite return this.personnalWebsite
&& this.personnalWebsite != null && this.personnalWebsite != null