diff --git a/connect/zenodoCommunities/zenodo-communities.service.ts b/connect/zenodoCommunities/zenodo-communities.service.ts index 5268a079..296f41bb 100644 --- a/connect/zenodoCommunities/zenodo-communities.service.ts +++ b/connect/zenodoCommunities/zenodo-communities.service.ts @@ -16,7 +16,8 @@ export class ZenodoCommunitiesService { //.map(res => res.json()) .pipe(map(res => [this.parseZenodoCommunities(res['hits'].hits),res['hits'].total])); } - getZenodoCommunityById(properties:EnvProperties, url: string) { + getZenodoCommunityById(properties:EnvProperties, id: string) { + let url = properties.zenodoCommunities + "/" + id; return this.http.get((properties.useLongCache)? (properties.cacheUrl+encodeURIComponent(url)) : url) //.map(res => res.json()) .pipe(map(res => { @@ -39,14 +40,14 @@ export class ZenodoCommunitiesService { parseZenodoCommunity(resData:any):ZenodoCommunityInfo { var result: ZenodoCommunityInfo = new ZenodoCommunityInfo(); - - result['title'] = resData.title; + let metadata = resData["metadata"]; + result['title'] = metadata.title; result['id'] = resData.id; - result['description'] = resData.description; - result['link'] = resData.links.html; - result['logoUrl'] = resData.logo_url; + result['description'] = metadata.description; + result['link'] = resData.links.self_html; + result['logoUrl'] = resData.links.logo; result['date'] = resData.updated; - result['page'] = resData.page; + result['page'] = metadata.page; return result; }