Commit 49470971 by artur.rachwal

trololo ;)

parent 8280ed44
...@@ -19,10 +19,10 @@ namespace Pi.Hub.Api.Controllers ...@@ -19,10 +19,10 @@ namespace Pi.Hub.Api.Controllers
[HttpPost] [HttpPost]
[Route("[action]")] [Route("[action]")]
public object Echo([FromBody]object obj) public object Write([FromBody]object obj)
{ {
string serialized = JsonConvert.SerializeObject(obj); string serialized = JsonConvert.SerializeObject(obj);
System.IO.File.AppendAllLines("C:\\apps\\msgs.txt", new[] { ","+serialized }); System.IO.File.AppendAllLines("C:\\apps\\msgs.txt", new[] { $",{{\"object\":{serialized},\"timestamp\":\"{DateTime.Now:F}\"}}" });
return new return new
{ {
Echo = obj Echo = obj
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment