diff --git a/src/app/boards/boards.component.html b/src/app/boards/boards.component.html
index 607bd5e..e9c81d5 100644
--- a/src/app/boards/boards.component.html
+++ b/src/app/boards/boards.component.html
@@ -1,11 +1,12 @@
,
-
+
/postgres/
+
-
+
-
\ No newline at end of file
+
diff --git a/src/app/boards/boards.component.ts b/src/app/boards/boards.component.ts
index 1a0fef8..a0da53e 100644
--- a/src/app/boards/boards.component.ts
+++ b/src/app/boards/boards.component.ts
@@ -17,14 +17,14 @@ export class BoardsComponent implements OnInit {
}
- refreshPosts() {
- this.apiChatService.getPosts().subscribe(response => {
+ refreshPosts(boardName: string) {
+ this.apiChatService.getPosts(boardName).subscribe(response => {
this.postsToShow = response
})
}
ngOnInit(): void {
- this.apiChatService.getPosts().subscribe(response => {
+ this.apiChatService.getPosts('postgres').subscribe(response => {
this.postsToShow = response
})
}
diff --git a/src/app/services/api-chat.service.ts b/src/app/services/api-chat.service.ts
index 33b3c6b..98fef19 100644
--- a/src/app/services/api-chat.service.ts
+++ b/src/app/services/api-chat.service.ts
@@ -10,10 +10,10 @@ export class ApiChatService {
constructor(private http: HttpClient) {
}
- getPosts(): Observable {
+ getPosts(boardName:string): Observable {
//console.log("Получаю посты и картинки");
- return this.http.get('http://api.vdk2ch.ru:5000/List/');
- //return this.http.get('http://localhost:7141/List/');
+ //return this.http.get('http://api.vdk2ch.ru:5000/List/?board=' + boardName);
+ return this.http.get('http://localhost:7141/List/?board=' + boardName);
}
sendPostToApi(text: string, imgUrl: string) {