Пример #1
0
        public async Task <IActionResult> Connect(string agentID, [FromQuery] ConnectAgentViewModel request)
        {
            try
            {
                Guid entityId              = new Guid(agentID);
                var  requestIp             = _accessor.HttpContext.Connection.RemoteIpAddress.ToString();
                var  connectedAgentDetails = _agentManager.ConnectAgent(agentID, requestIp, request);

                return(Ok(connectedAgentDetails));
            }
            catch (Exception ex)
            {
                return(ex.GetActionResult());
            }
        }