mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 04:17:32 +00:00
fix: features query (#2610)
This commit is contained in:
@@ -10,12 +10,12 @@ import (
|
||||
)
|
||||
|
||||
func (s *Server) GetDefaultFeatures(ctx context.Context, _ *admin_pb.GetDefaultFeaturesRequest) (*admin_pb.GetDefaultFeaturesResponse, error) {
|
||||
features, err := s.features.GetDefaultFeatures(ctx)
|
||||
features, err := s.query.DefaultFeatures(ctx)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &admin_pb.GetDefaultFeaturesResponse{
|
||||
Features: features_grpc.FeaturesFromModel(features),
|
||||
Features: features_grpc.ModelFeaturesToPb(features),
|
||||
}, nil
|
||||
}
|
||||
|
||||
@@ -30,12 +30,12 @@ func (s *Server) SetDefaultFeatures(ctx context.Context, req *admin_pb.SetDefaul
|
||||
}
|
||||
|
||||
func (s *Server) GetOrgFeatures(ctx context.Context, req *admin_pb.GetOrgFeaturesRequest) (*admin_pb.GetOrgFeaturesResponse, error) {
|
||||
features, err := s.features.GetOrgFeatures(ctx, req.OrgId)
|
||||
features, err := s.query.FeaturesByOrgID(ctx, req.OrgId)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &admin_pb.GetOrgFeaturesResponse{
|
||||
Features: features_grpc.FeaturesFromModel(features),
|
||||
Features: features_grpc.ModelFeaturesToPb(features),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
@@ -25,7 +25,6 @@ type Server struct {
|
||||
iam repository.IAMRepository
|
||||
administrator repository.AdministratorRepository
|
||||
repo repository.Repository
|
||||
features repository.FeaturesRepository
|
||||
users repository.UserRepository
|
||||
iamDomain string
|
||||
}
|
||||
@@ -41,7 +40,6 @@ func CreateServer(command *command.Commands, query *query.Queries, repo reposito
|
||||
iam: repo,
|
||||
administrator: repo,
|
||||
repo: repo,
|
||||
features: repo,
|
||||
users: repo,
|
||||
iamDomain: iamDomain,
|
||||
}
|
||||
|
Reference in New Issue
Block a user