Exemplo n.º 1
0
        public async Task <ActionResult> CreateRobotAsync([FromBody] CreateRobotDto robot)
        {
            BuildUserPrincipal();
            robot.UserId = ApiUser.Id;

            var result = await _robotService.CreateRobotAsync(robot);

            _client.Enqueue(() => _robotService.SendNotificationByUserInterestsAsync(CancellationToken.None));

            return(StatusCode((int)HttpStatusCode.Created, Json(JsonResultData.Success(result))));
        }