public async Task <IActionResult> AddHtmlOrder([FromBody] AddHtmlOrderRequest request)
        {
            var userId = TokenDecryptor.DecryptUserId(this.User.Identity as ClaimsIdentity);
            var result = await _bus.Send(new AddHtmlOrderCommand(userId, request.Frequency, request.TargetAddress, request.SubjectOfQuestion));

            return(result.Match <IActionResult>(
                       some: x => Ok(x),
                       () => BadRequest()));
        }
        public async Task <IActionResult> GetHtmlOrder([FromQuery] int id)
        {
            var userId = TokenDecryptor.DecryptUserId(this.User.Identity as ClaimsIdentity);
            var result = await _bus.Send(new GetHtmlOrderCommand(userId, id));

            return(result.Match <IActionResult>(
                       some: x => Ok(x),
                       none: () => BadRequest()));
        }
        public async Task <IActionResult> GetHtmlOrdersForUser()
        {
            var userId = TokenDecryptor.DecryptUserId(this.User.Identity as ClaimsIdentity);
            var result = await _bus.Send(new GetHtmlOrdersCommand(userId));

            return(result.Match <IActionResult>(
                       some: x => Ok(x),
                       none: () => NoContent()));
        }