Ejemplo n.º 1
0
        public IActionResult CreateIssue(IssuePostRequest Issue)
        {
            if (_userManager.CurrentUser == null)
            {
                return(Unauthorized());
            }

            IssueGetResponse CreatedIssue = _dataRepository.CreateIssue(Issue);

            return(Ok(CreatedIssue));
        }
Ejemplo n.º 2
0
        public IActionResult GetIssue(int Id)
        {
            if (_userManager.CurrentUser == null)
            {
                return(Unauthorized());
            }

            IssueGetResponse Issue = _dataRepository.GetIssue(Id);

            return(Ok(Issue));
        }
Ejemplo n.º 3
0
        public IActionResult UpdateIssue(int Id, [FromBody] IssuePutRequest Issue)
        {
            if (_userManager.CurrentUser == null)
            {
                return(Unauthorized());
            }

            IssueGetResponse updatedIssue = _dataRepository.UpdateIssue(Id, Issue);

            if (updatedIssue != null)
            {
                return(Ok(updatedIssue));
            }
            else
            {
                return(NotFound());
            }
        }