Exemplo n.º 1
0
        public async Task <IActionResult> Block()
        {
            var           bytes  = HttpContext.Request.Body.ToBytes();
            var           json   = Encoding.UTF8.GetString(LZ4Codec.Unwrap(bytes));
            var           input  = JsonConvert.DeserializeObject <BlockInput>(json);
            IActionResult result = BadRequest();

            if (TryValidateModel(input))
            {
                await _blockService.Callback(input);

                result = Ok();
            }

            return(result);
        }