public async Task <ActionResult <Change> > PutIssueDesc(int id, IssueStringProp issueDesc)
        {
            if (issueDesc == null)
            {
                return(BadRequest());
            }

            var desc = issueDesc.Text;

            if (desc.Length == 0)
            {
                return(BadRequest());
            }

            var projectId = HttpContext.Session.GetInt32("projectId");
            var issue     = await _context.Issues.FirstAsync(i => i.Id == id && i.ProjectId == projectId);

            if (issue == null)
            {
                return(BadRequest());
            }

            var change = new Change {
                Before = issue.Description, After = desc, IssueId = id, Property = "Description"
            };

            await PostChange(change);

            issue.Description = desc;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                throw;
            }

            return(change);
        }
        public async Task <ActionResult <Change> > PutIssueName(int id, IssueStringProp issueName)
        {
            if (issueName == null)
            {
                return(BadRequest());
            }

            var name = issueName.Text;

            if (name.Length > 250 ||
                name.Length == 0)
            {
                return(BadRequest());
            }

            var projectId = HttpContext.Session.GetInt32("projectId");
            var issue     = await _context.Issues.FirstAsync(i => i.Id == id && i.ProjectId == projectId);

            if (issue == null)
            {
                return(BadRequest());
            }

            issue.Name = name;

            try
            {
                await _context.SaveChangesAsync();
            }
            catch (DbUpdateConcurrencyException)
            {
                throw;
            }

            return(NoContent());
        }