in method getAllpages() add again optional parameter pid to get all pages of portaltype community and the specific pid

This commit is contained in:
argirok 2021-12-17 14:06:05 +02:00
parent 0cddbdf857
commit 9459e944c5
1 changed files with 3 additions and 3 deletions

View File

@ -252,8 +252,8 @@ export class HelpContentService {
.pipe(catchError(this.handleError));
}
// End of replacing part of getPages (now getAllPages)
getAllPages(helpContentUrl:string) {//,pid:string,with_positions:boolean=null) {
//TODO double check with konstantina - there is no param that we are asking the community pages. without pid we get all portalTypes
getAllPages(helpContentUrl:string, pid:string = null) {//with_positions:boolean=null) {
// let parameters: string = "";
// if(pid || with_positions == true || with_positions == false) {
// parameters = "?";
@ -264,7 +264,7 @@ export class HelpContentService {
// parameters += "&with_positions="+with_positions;
// }
// }
return this.http.get<Array<Page>>(helpContentUrl + 'page')
return this.http.get<Array<Page>>(helpContentUrl + 'page' + (pid?"pid="+pid:""))
//.map(res => <Array<Page>> res.json())
.pipe(catchError(this.handleError));
}