diff --git a/src/app/components/fragments/content-list/content-list.component.ts b/src/app/components/fragments/content-list/content-list.component.ts index 05c7e4f6e16b8223aebbe2af763f8a39e9a1ad69..f30699b9115d4a4068fd6f8aafbce2e7e6aa2aea 100644 --- a/src/app/components/fragments/content-list/content-list.component.ts +++ b/src/app/components/fragments/content-list/content-list.component.ts @@ -35,14 +35,7 @@ export class ContentListComponent implements OnInit { ngOnInit() { this.roomId = localStorage.getItem(`roomId`); - this.getContent(this.roomId); - } - getContent(roomId: string): void { - this.contentService.getContents(roomId) - .subscribe(content => { - this.contents = content; - }); } findIndexOfSubject(subject: string): number { diff --git a/src/app/services/http/content.service.ts b/src/app/services/http/content.service.ts index 64d49e0d418d810f388ef5207e6ee279f61b8f66..93b918d925ad3447b208a5b10b68785df6b0d3c5 100644 --- a/src/app/services/http/content.service.ts +++ b/src/app/services/http/content.service.ts @@ -33,7 +33,7 @@ export class ContentService extends BaseHttpService { } getContentsByIds(ids: string[]): Observable<Content[]> { - const connectionUrl = this.apiUrl.base + this.apiUrl.content + '/' + ids.toString(); + const connectionUrl = this.apiUrl.base + this.apiUrl.content + '/?ids=' + ids; return this.http.get<Content[]>(connectionUrl).pipe( tap(() => ''), catchError(this.handleError('getContentsByIds', []))