public IActionResult CopyList([FromBody] CopyListDto copyListDto) { try { var srcList = _listService.Get(copyListDto.Id); var copiedList = _listService.Copy(srcList); var res = new ObjectResult(new { listId = copiedList.Id }); res.StatusCode = StatusCodes.Status201Created; return(res); } catch (Exception ex) { return(BadRequest(new { message = ex.Message })); } }