Compare commits
2 Commits
9f6b892831
...
eac13fb2d3
Author | SHA1 | Date | |
---|---|---|---|
eac13fb2d3 | |||
e73f0b04ec |
@ -5,7 +5,7 @@ namespace NeDvachAPI.Controllers
|
||||
{
|
||||
[ApiController]
|
||||
[Route("[controller]")]
|
||||
public class HomeController : ControllerBase
|
||||
public class ListController : ControllerBase
|
||||
{
|
||||
[HttpGet(Name = "GetPosts")]
|
||||
public string Get()
|
||||
@ -13,6 +13,7 @@ namespace NeDvachAPI.Controllers
|
||||
Post[] posts = DBchat.DbList();
|
||||
string postsJson = JsonSerializer.Serialize(posts);
|
||||
return postsJson ;
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -7,10 +7,9 @@ namespace NeDvachAPI.Controllers
|
||||
[Route("[controller]")]
|
||||
public class PostToController : ControllerBase
|
||||
{
|
||||
[HttpGet(Name = "PostPosts")]
|
||||
public void ReceivePost(string postJson)
|
||||
[HttpPost(Name = "PostPosts")]
|
||||
public void ReceivePost([FromBody] Post ReceivedPost)
|
||||
{
|
||||
Post ReceivedPost = JsonSerializer.Deserialize<Post>(postJson);
|
||||
DBchat.SendPost(ReceivedPost);
|
||||
}
|
||||
}
|
||||
|
BIN
bin/Debug/net6.0/NeDvachAPI.dll
Normal file
BIN
bin/Debug/net6.0/NeDvachAPI.dll
Normal file
Binary file not shown.
BIN
bin/Debug/net6.0/NeDvachAPI.pdb
Normal file
BIN
bin/Debug/net6.0/NeDvachAPI.pdb
Normal file
Binary file not shown.
BIN
obj/Debug/net6.0/NeDvachAPI.dll
Normal file
BIN
obj/Debug/net6.0/NeDvachAPI.dll
Normal file
Binary file not shown.
BIN
obj/Debug/net6.0/NeDvachAPI.pdb
Normal file
BIN
obj/Debug/net6.0/NeDvachAPI.pdb
Normal file
Binary file not shown.
BIN
obj/Debug/net6.0/ref/NeDvachAPI.dll
Normal file
BIN
obj/Debug/net6.0/ref/NeDvachAPI.dll
Normal file
Binary file not shown.
BIN
obj/Debug/net6.0/refint/NeDvachAPI.dll
Normal file
BIN
obj/Debug/net6.0/refint/NeDvachAPI.dll
Normal file
Binary file not shown.
15
obj/staticwebassets.pack.sentinel
Normal file
15
obj/staticwebassets.pack.sentinel
Normal file
@ -0,0 +1,15 @@
|
||||
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
|
Reference in New Issue
Block a user