diff --git a/monitor/entities/stakeholder.ts b/monitor/entities/stakeholder.ts index 3f80e5c2..b06375fe 100644 --- a/monitor/entities/stakeholder.ts +++ b/monitor/entities/stakeholder.ts @@ -24,21 +24,13 @@ export class Stakeholder { visibility: Visibility; creationDate: Date = null; updateDate: Date; - managers: string[]; logoUrl: string; isUpload: boolean = false; - topics: Topic[]; description: string; + topics: any[]; - constructor(id: string, type: StakeholderType, index_id, index_name: string, index_shortName: string, alias: string, visibility: Visibility, logoUrl: string, defaultId: string = null, description: string = null) { - this.initializeFunder(id, type, index_id, index_name, index_shortName, defaultId, alias, visibility, logoUrl, description); - this.topics = []; - this.managers = []; - } - - initializeFunder(id: string, type: StakeholderType, index_id, index_name: string, index_shortName: string, defaultId: string, - alias: string, visibility: Visibility, logoUrl: string, description: string = null) { - this._id = id; + constructor(_id: string, type: StakeholderType, index_id, index_name: string, index_shortName: string, alias: string, visibility: Visibility, logoUrl: string, defaultId: string = null, description: string = null) { + this._id = _id; this.type = type; this.index_id = index_id; this.index_name = index_name; @@ -48,6 +40,7 @@ export class Stakeholder { this.visibility = visibility; this.logoUrl = logoUrl; this.description = description; + this.topics = []; } } diff --git a/monitor/services/stakeholder.service.ts b/monitor/services/stakeholder.service.ts index adf440b3..35541e50 100644 --- a/monitor/services/stakeholder.service.ts +++ b/monitor/services/stakeholder.service.ts @@ -71,7 +71,7 @@ export class StakeholderService { })); } - getMyStakeholders(url: string, type: string = null): Observable<(Stakeholder & StakeholderInfo)[]> { + getMyStakeholders(url: string, type: string = null): Observable { return this.http.get(url + '/my-stakeholder' + ((type)?('?type=' + type):''), CustomOptions.registryOptions()).pipe(map(stakeholders => { return this.formalize(stakeholders); }));