MM-61032: Add default_team_id to accept invite flow (#28841)

* add default_team_id to accept invite api

* add team selector to accept invite flow UI

* e2e

* lint/i18n
Этот коммит содержится в:
Caleb Roseland
2024-10-18 05:26:38 -05:00
коммит произвёл GitHub
родитель 5a923e0b94
Коммит fcded9559c
16 изменённых файлов: 124 добавлений и 32 удалений

Просмотреть файл

@@ -12,15 +12,16 @@ import (
)
// AcceptInvitation is called when accepting an invitation to connect with a remote cluster.
func (rcs *Service) AcceptInvitation(invite *model.RemoteClusterInvite, name string, displayName, creatorId string, siteURL string) (*model.RemoteCluster, error) {
func (rcs *Service) AcceptInvitation(invite *model.RemoteClusterInvite, name string, displayName string, creatorId string, siteURL string, defaultTeamId string) (*model.RemoteCluster, error) {
rc := &model.RemoteCluster{
RemoteId: invite.RemoteId,
Name: name,
DisplayName: displayName,
Token: model.NewId(),
RemoteToken: invite.Token,
SiteURL: invite.SiteURL,
CreatorId: creatorId,
RemoteId: invite.RemoteId,
Name: name,
DisplayName: displayName,
DefaultTeamId: defaultTeamId,
Token: model.NewId(),
RemoteToken: invite.Token,
SiteURL: invite.SiteURL,
CreatorId: creatorId,
}
rcSaved, err := rcs.server.GetStore().RemoteCluster().Save(rc)