Compare commits
2 Commits
5d6360743f
...
ced76ed70c
Author | SHA1 | Date | |
---|---|---|---|
ced76ed70c | |||
0f4b8e1cb2 |
@ -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>
|
||||||
|
@ -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)
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user