Esempio n. 1
0
        public async Task HandleAsync(AssignLabelsToBug command)
        {
            var Bug = await bugRepository.GetAsync(command.IssueId);

            var labels = await labelsSearcher.GetLabels(Bug.ProjectId, command.LabelsIds);

            Bug.AssignLabels(command.LabelsIds, labels);
            await bugRepository.Update(Bug, Bug.Version);
        }
Esempio n. 2
0
        public async Task <IActionResult> AssignLabels([FromRoute] Guid projectId, [FromRoute] Guid bugId, [FromBody] AssignLabelsToBug command)
        {
            command.ProjectId = projectId;
            command.IssueId   = bugId;
            await commandQueryBus.SendAsync(command);

            return(Ok());
        }