package cluster

import (
	"context"

	"github.com/tidbcloud/tidb-management-service/utilities/bizerr"
)

// UpdateProjectId updates the project_id of a cluster in nextgen-global-service.
// This is used to synchronize project assignment changes from tidb-mgmt-service.
func (s *serviceImpl) UpdateProjectId(ctx context.Context, clusterId, projectId uint64) bizerr.BizError {
	ctx, span := tracer.Start(ctx, "ClusterService.UpdateProjectId")
	defer span.End()

	return s.clusterRepo.UpdateProjectId(ctx, clusterId, projectId)
}
