Fix params format for queryId

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-connect-portal/trunk@50979 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
sofia.baltzi 2018-02-28 16:04:49 +00:00
parent 611e8801b3
commit 8125c9ae0c
2 changed files with 11 additions and 9 deletions

View File

@ -76,11 +76,10 @@ export class CommunityComponent {
communityId => {
this.communityId = communityId['communityId'];
});
this._communityService.getCommunity('https://dev-openaire.d4science.org/openaire/community/'+this.communityId).subscribe (
community => {
this.community = community;
this.params = {community: encodeURIComponent(community.queryId)};
this.params = {community: encodeURIComponent('"'+community.queryId+'"')};
console.log(community);
});

View File

@ -14,15 +14,18 @@ export class CommunityService {
}
getTotal(url: string) {
return this.http.get(url)
.map(res => <any> res.json()).map(res => res.total).do(res => {console.log(res)});
return this.http.get(url).map(res => <any> res.json()).map(res => res.total).do(res => {console.log(res)});
}
// getTotal()
//
// countResults(url:string): string {
//
// }
countTotal(url:string): any {
let total;
return total;
}
getResults(url: string) {
return this.http.get(url).map(res => <any> res.json()).map(res => this.parseResults(res['results']));