예제 #1
0
        public async Task <IActionResult> Add([FromBody] ActionPlanParams obj)
        {
            string token  = Request.Headers["Authorization"];
            var    userID = Extensions.GetDecodeTokenByProperty(token, "nameid").ToInt();

            obj.OwnerID = userID;
            var data = await _actionPlanService.Add(obj);//(item, obj.Subject, obj.Auditor, obj.CategoryID);

            try
            {
                await _hubContext.Clients.All.SendAsync("ReceiveMessage", "user", "message");
            }
            catch (System.Exception ex)
            {
                throw;
            }



            return(Ok(new { status = data.Status, isSendmail = true }));
        }