Quick fix, set default board name.
All checks were successful
continuous-integration/drone/push Build is passing
All checks were successful
continuous-integration/drone/push Build is passing
This commit is contained in:
parent
93c5826bff
commit
fa92bc1c5c
@ -1,7 +1,7 @@
|
|||||||
<div class="wrappe">
|
<div class="wrappe">
|
||||||
<img src="http://static.vdk2ch.ru:15555/test-public/16657431265390.png" alt="свiня" width="150">
|
<img src="http://static.vdk2ch.ru:15555/test-public/16657431265390.png" alt="свiня" width="150">
|
||||||
<app-send-post></app-send-post>,
|
<app-send-post></app-send-post>,
|
||||||
<h2>/postgres/</h2>
|
<h2> {{boardName}} </h2>
|
||||||
<button (click)="refreshPosts('postgres')">Общий раздел</button>
|
<button (click)="refreshPosts('postgres')">Общий раздел</button>
|
||||||
<post-single
|
<post-single
|
||||||
*ngFor="let post of postsToShow" [post]="post"
|
*ngFor="let post of postsToShow" [post]="post"
|
||||||
|
@ -12,6 +12,7 @@ export class BoardsComponent implements OnInit {
|
|||||||
command: string = "";
|
command: string = "";
|
||||||
response: any;
|
response: any;
|
||||||
postsToShow: SinglePost[] = []
|
postsToShow: SinglePost[] = []
|
||||||
|
boardName:string = 'postgres';
|
||||||
|
|
||||||
constructor(public apiChatService: ApiChatService) {
|
constructor(public apiChatService: ApiChatService) {
|
||||||
|
|
||||||
|
@ -12,8 +12,8 @@ export class ApiChatService {
|
|||||||
|
|
||||||
getPosts(boardName:string): Observable<SinglePost[]> {
|
getPosts(boardName:string): Observable<SinglePost[]> {
|
||||||
//console.log("Получаю посты и картинки");
|
//console.log("Получаю посты и картинки");
|
||||||
//return this.http.get<SinglePost[]>('http://api.vdk2ch.ru:5000/List/?board=' + boardName);
|
return this.http.get<SinglePost[]>('http://api.vdk2ch.ru:5000/List/?board=' + boardName);
|
||||||
return this.http.get<SinglePost[]>('http://localhost:7141/List/?board=' + boardName);
|
//return this.http.get<SinglePost[]>('http://localhost:7141/List/?board=' + boardName);
|
||||||
}
|
}
|
||||||
|
|
||||||
sendPostToApi(text: string, imgUrl: string) {
|
sendPostToApi(text: string, imgUrl: string) {
|
||||||
|
Reference in New Issue
Block a user