Compare commits

..

No commits in common. "eac13fb2d33a054aa8b9fd348ecb8127ff63005c" and "9f6b892831af6db39b059d2000f438e2516c9af6" have entirely different histories.

9 changed files with 4 additions and 19 deletions

View File

@ -5,7 +5,7 @@ namespace NeDvachAPI.Controllers
{
[ApiController]
[Route("[controller]")]
public class ListController : ControllerBase
public class HomeController : ControllerBase
{
[HttpGet(Name = "GetPosts")]
public string Get()
@ -13,7 +13,6 @@ namespace NeDvachAPI.Controllers
Post[] posts = DBchat.DbList();
string postsJson = JsonSerializer.Serialize(posts);
return postsJson ;
}
}
}

View File

@ -7,9 +7,10 @@ namespace NeDvachAPI.Controllers
[Route("[controller]")]
public class PostToController : ControllerBase
{
[HttpPost(Name = "PostPosts")]
public void ReceivePost([FromBody] Post ReceivedPost)
[HttpGet(Name = "PostPosts")]
public void ReceivePost(string postJson)
{
Post ReceivedPost = JsonSerializer.Deserialize<Post>(postJson);
DBchat.SendPost(ReceivedPost);
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -1,15 +0,0 @@
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0
2.0