コード例 #1
0
        public async Task <IActionResult> Put(string id, [FromBody] Agent request)
        {
            try
            {
                var existingAgent = _agentManager.UpdateAgent(id, request);
                var result        = await base.PutEntity(id, existingAgent);

                await _webhookPublisher.PublishAsync("Agents.AgentUpdated", existingAgent.Id.ToString(), existingAgent.Name).ConfigureAwait(false);

                return(result);
            }
            catch (Exception ex)
            {
                return(ex.GetActionResult());
            }
        }