mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:47:33 +00:00
refactor: cleanup unused code (#7130)
* refactor: drop unused code * refactor: drop unused code
This commit is contained in:
@@ -11,7 +11,6 @@ import (
|
||||
"github.com/zitadel/zitadel/internal/command"
|
||||
"github.com/zitadel/zitadel/internal/domain"
|
||||
"github.com/zitadel/zitadel/internal/eventstore/v1/models"
|
||||
iam_model "github.com/zitadel/zitadel/internal/iam/model"
|
||||
"github.com/zitadel/zitadel/internal/query"
|
||||
"github.com/zitadel/zitadel/internal/zerrors"
|
||||
idp_pb "github.com/zitadel/zitadel/pkg/grpc/idp"
|
||||
@@ -136,29 +135,6 @@ func idpQueryToModel(idpQuery *mgmt_pb.IDPQuery) (query.SearchQuery, error) {
|
||||
}
|
||||
}
|
||||
|
||||
func idpProviderViewsToDomain(idps []*iam_model.IDPProviderView) []*domain.IDPProvider {
|
||||
idpProvider := make([]*domain.IDPProvider, len(idps))
|
||||
for i, idp := range idps {
|
||||
idpProvider[i] = &domain.IDPProvider{
|
||||
ObjectRoot: models.ObjectRoot{
|
||||
AggregateID: idp.AggregateID,
|
||||
},
|
||||
IDPConfigID: idp.IDPConfigID,
|
||||
Type: idpConfigTypeToDomain(idp.IDPProviderType),
|
||||
}
|
||||
}
|
||||
return idpProvider
|
||||
}
|
||||
|
||||
func idpConfigTypeToDomain(idpType iam_model.IDPProviderType) domain.IdentityProviderType {
|
||||
switch idpType {
|
||||
case iam_model.IDPProviderTypeOrg:
|
||||
return domain.IdentityProviderTypeOrg
|
||||
default:
|
||||
return domain.IdentityProviderTypeSystem
|
||||
}
|
||||
}
|
||||
|
||||
func userLinksToDomain(idps []*query.IDPUserLink) []*domain.UserIDPLink {
|
||||
links := make([]*domain.UserIDPLink, len(idps))
|
||||
for i, idp := range idps {
|
||||
|
Reference in New Issue
Block a user