示例#1
0
        public async Task <IActionResult> Update([FromBody] UpdateIncidentModel model)
        {
            return(await ProcessAsync(async() =>
            {
                var user = await UserService.GetUserByPrincipal(User);

                await _incidentService.Update(model);

                return Ok("Incident updated.");
            }, Permissions.Behaviour.Incidents.EditIncidents));
        }
示例#2
0
        public async Task <IActionResult> Update([FromBody] UpdateIncidentModel model)
        {
            try
            {
                await _behaviourService.UpdateIncident(model);

                return(Ok());
            }
            catch (Exception e)
            {
                return(HandleException(e));
            }
        }