Compare commits

..

2 Commits

Author SHA1 Message Date
ced76ed70c Post redesighn.
All checks were successful
continuous-integration/drone/push Build is passing
2022-11-05 21:25:21 +10:00
0f4b8e1cb2 Post redesighn. 2022-11-05 21:24:15 +10:00
2 changed files with 8 additions and 6 deletions

View File

@ -1,5 +1,7 @@
<div class="post"> <div class="post">
<img *ngIf="post.ImgURL != '0'" src="{{post.ImgURL}}" alt="anonpls" width="140"> # {{post.Id}} <p> # {{post.Id}} {{post.Timestamp}}</p>
<h3>{{post.Timestamp}}</h3> <a href="{{post.ImgURL}}" target="_blank">
<h2>{{post.Text}}</h2> <img *ngIf="post.ImgURL != '0'" src="{{post.ImgURL}}" alt="anonpls" width="140">
</a>
<p>{{post.Text}}</p>
</div> </div>

View File

@ -11,13 +11,13 @@ export class ApiChatService {
} }
getPosts(): Observable<SinglePost[]> { getPosts(): Observable<SinglePost[]> {
console.log("Получаю посты и картинки"); //console.log("Получаю посты и картинки");
return this.http.get<SinglePost[]>('http://api.vdk2ch.ru:5000/List/'); return this.http.get<SinglePost[]>('http://api.vdk2ch.ru:5000/List/');
//return this.http.get<SinglePost[]>('http://localhost:7141/List/'); //return this.http.get<SinglePost[]>('http://localhost:7141/List/');
} }
sendPostToApi(text: string, imgUrl: string) { sendPostToApi(text: string, imgUrl: string) {
console.log("Отправляю пост..."); //console.log("Отправляю пост...");
var postToSend = var postToSend =
{ {
Timestamp: text, Timestamp: text,
@ -25,7 +25,7 @@ export class ApiChatService {
Text: text, Text: text,
ImgURL: imgUrl ImgURL: imgUrl
} }
console.log(postToSend) //console.log(postToSend)
return this.http.post('http://api.vdk2ch.ru:5000/PostTo', postToSend) return this.http.post('http://api.vdk2ch.ru:5000/PostTo', postToSend)
//return this.http.post('http://localhost:7141/PostTo', postToSend) //return this.http.post('http://localhost:7141/PostTo', postToSend)