zitadel/internal/api/grpc/auth/language.go
Fabi 01501c5087
feat: iam query (#3085)
* fix: only show factors with state ready

* fix: get iam by id and clean up code

* fix: get iam by id and clean up code

* fix: remove unused code
2022-01-21 14:01:25 +01:00

17 lines
466 B
Go

package auth
import (
"context"
"github.com/caos/zitadel/internal/api/grpc/text"
auth_pb "github.com/caos/zitadel/pkg/grpc/auth"
)
func (s *Server) GetSupportedLanguages(ctx context.Context, req *auth_pb.GetSupportedLanguagesRequest) (*auth_pb.GetSupportedLanguagesResponse, error) {
langs, err := s.query.Languages(ctx)
if err != nil {
return nil, err
}
return &auth_pb.GetSupportedLanguagesResponse{Languages: text.LanguageTagsToStrings(langs)}, nil
}