mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-12 02:54:20 +00:00
fix: return secret generators (#6159)
This commit is contained in:
parent
a5b4319f1f
commit
59d67bde5f
@ -18,6 +18,7 @@ func (s *Server) ListSecretGenerators(ctx context.Context, req *admin_pb.ListSec
|
||||
return nil, err
|
||||
}
|
||||
return &admin_pb.ListSecretGeneratorsResponse{
|
||||
Result: SecretGeneratorsToPb(result.SecretGenerators),
|
||||
Details: object.ToListDetails(result.Count, result.Sequence, result.Timestamp),
|
||||
}, nil
|
||||
}
|
||||
|
@ -62,6 +62,14 @@ func UpdateSecretGeneratorToConfig(req *admin_pb.UpdateSecretGeneratorRequest) *
|
||||
}
|
||||
}
|
||||
|
||||
func SecretGeneratorsToPb(generators []*query.SecretGenerator) []*settings_pb.SecretGenerator {
|
||||
list := make([]*settings_pb.SecretGenerator, len(generators))
|
||||
for i, generator := range generators {
|
||||
list[i] = SecretGeneratorToPb(generator)
|
||||
}
|
||||
return list
|
||||
}
|
||||
|
||||
func SecretGeneratorToPb(generator *query.SecretGenerator) *settings_pb.SecretGenerator {
|
||||
mapped := &settings_pb.SecretGenerator{
|
||||
Length: uint32(generator.Length),
|
||||
|
Loading…
Reference in New Issue
Block a user