[Trunk | Connect]: subscribe.component.ts: [Bug fix] In subscribe.service: method "getNumberOfCommunitySubscribers()" (/community/{pid}/subscribers/count) returns now {"value": _number_}

(Used to return String. This was a problem for cache. API changed to return object, where number of subscribers is mapped to "value").


git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@58486 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
konstantina.galouni 2020-04-14 09:35:25 +00:00
parent 667c96f88e
commit d105c6aa91
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ export class SubscribeComponent {
if (this.communityId) {
this._subscribeService.getNumberOfCommunitySubscribers(this.properties, this.communityId).subscribe(
res => {
this.subscribers = res;//(res && res.subscribers && res.subscribers.length) ? res.subscribers.length : 0;
this.subscribers = (res && res.value) ? res.value : 0;//(res && res.subscribers && res.subscribers.length) ? res.subscribers.length : 0;
},
error => {
this.handleError("Error getting community subscribers for community with id: " + this.communityId, error);