Ejemplo n.º 1
0
        public async Task <IActionResult> AddSub(AddSubViewModel subComment)
        {
            string token  = Request.Headers["Authorization"];
            var    userID = JWTExtensions.GetDecodeTokenByProperty(token, "nameid").ToInt();

            subComment.CurrentUser = userID;
            var model = await _commentService.AddSub(subComment);

            // await _hubContext.Clients.All.SendAsync("ReceiveMessage", model.Item2, "message");
            return(Ok(model.Item3));
        }