예제 #1
0
        public IActionResult Requests([FromBody] WinWrapMessage postdata)
        {
            string request = postdata.ToString();

            WinWrapBasicService.Singleton.SendRequests(request);
            return(Ok(new WinWrapMessage("[]")));
        }
예제 #2
0
        public IActionResult Responses(string ids, [FromBody] WinWrapMessage postdata)
        {
            SortedSet <int> idset = new SortedSet <int>();

            foreach (string idx in ids.Split('-'))
            {
                if (int.TryParse(idx, out int id))
                {
                    idset.Add(id);
                }
            }

            string responses = WinWrapBasicService.Singleton.GetResponses(idset);

            return(Ok(new WinWrapMessage(responses)));
        }