public async Task <ActionResult <IssueDto> > PostIssue([FromBody] IssueDto issueDto)
        {
            _logger.LogInformation($"Post issue {issueDto}", issueDto);
            var insertedIssue = await _issueService.Add(issueDto);

            return(CreatedAtAction("GetIssue", new { id = insertedIssue.Id }, insertedIssue));
        }
Ejemplo n.º 2
0
 public BaseResponse Add(Issue issue)
 {
     return(DoSuccess(() =>
     {
         _service.Add(issue);
     }));
 }
        private void CreateIssue(CreateIssueCommand command, PlexMediaItemRow plexMediaItem)
        {
            var issue = new IssueRow
            {
                PlexMediaItem = plexMediaItem,
                Title         = command.Title,
                Description   = command.Description,
                IssueStatus   = IssueStatuses.Pending,
                UserId        = _claimsPrincipalAccessor.UserId,
            };

            _issueService.Add(issue);
        }
Ejemplo n.º 4
0
 private void GivenAnIssueIsCreated()
 {
     _issueService.Add(Arg.Do <IssueRow>(x => _issueCreated = x));
 }