MCPcopy Create free account
hub / github.com/GmpABR/NexusFlow / UpdateColumnAsync

Method UpdateColumnAsync

backend/Services/BoardService.cs:746–775  ·  view source on GitHub ↗
(int boardId, int columnId, UpdateColumnDto dto, int userId)

Source from the content-addressed store, hash-verified

744 }
745
746 public async Task<ColumnDto?> UpdateColumnAsync(int boardId, int columnId, UpdateColumnDto dto, int userId)
747 {
748 var board = await _db.Boards
749 .Include(b => b.Columns)
750 .Include(b => b.Members)
751 .Include(b => b.Workspace).ThenInclude(w => w.Members)
752 .FirstOrDefaultAsync(b => b.Id == boardId);
753
754 if (board == null) return null;
755
756 var isMember = board.OwnerId == userId
757 || board.Members.Any(m => m.UserId == userId && m.Status == "Accepted")
758 || (board.Workspace != null && board.Workspace.Members.Any(wm => wm.UserId == userId && wm.Status == "Accepted"));
759
760 if (!isMember) return null;
761
762 var column = board.Columns.FirstOrDefault(c => c.Id == columnId);
763 if (column == null) return null;
764
765 column.Name = dto.Name;
766 await _db.SaveChangesAsync();
767
768 return new ColumnDto
769 {
770 Id = column.Id,
771 Name = column.Name,
772 Order = column.Order,
773 TaskCards = new List<TaskCardDto>() // Not returning tasks here for simplicity
774 };
775 }
776
777 public async Task<BoardInviteDto> CreateBoardInviteAsync(int boardId, string role, int requesterId)
778 {

Callers 1

UpdateColumnMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected