Quick fix, set default board name.
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
RakVhalate 2022-11-12 04:06:22 +10:00
parent 93c5826bff
commit fa92bc1c5c
3 changed files with 4 additions and 3 deletions

View File

@ -1,7 +1,7 @@
<div class="wrappe">
<img src="http://static.vdk2ch.ru:15555/test-public/16657431265390.png" alt="свiня" width="150">
<app-send-post></app-send-post>,
<h2>/postgres/</h2>
<h2> {{boardName}} </h2>
<button (click)="refreshPosts('postgres')">Общий раздел</button>
<post-single
*ngFor="let post of postsToShow" [post]="post"

View File

@ -12,6 +12,7 @@ export class BoardsComponent implements OnInit {
command: string = "";
response: any;
postsToShow: SinglePost[] = []
boardName:string = 'postgres';
constructor(public apiChatService: ApiChatService) {

View File

@ -12,8 +12,8 @@ export class ApiChatService {
getPosts(boardName:string): Observable<SinglePost[]> {
//console.log("Получаю посты и картинки");
//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://api.vdk2ch.ru:5000/List/?board=' + boardName);
//return this.http.get<SinglePost[]>('http://localhost:7141/List/?board=' + boardName);
}
sendPostToApi(text: string, imgUrl: string) {