mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 00:17:32 +00:00
feat: user query (#3075)
* user queries * user query * user query * user tests * remove old code * user metadata * cleanup * fix merge * cleanup * cleanup * fixes
This commit is contained in:
@@ -3,18 +3,19 @@ package auth
|
||||
import (
|
||||
"context"
|
||||
|
||||
"github.com/caos/zitadel/internal/api/authz"
|
||||
object_grpc "github.com/caos/zitadel/internal/api/grpc/object"
|
||||
user_grpc "github.com/caos/zitadel/internal/api/grpc/user"
|
||||
auth_pb "github.com/caos/zitadel/pkg/grpc/auth"
|
||||
)
|
||||
|
||||
func (s *Server) GetMyProfile(ctx context.Context, req *auth_pb.GetMyProfileRequest) (*auth_pb.GetMyProfileResponse, error) {
|
||||
profile, err := s.repo.MyProfile(ctx)
|
||||
profile, err := s.query.GetHumanProfile(ctx, authz.GetCtxData(ctx).UserID)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &auth_pb.GetMyProfileResponse{
|
||||
Profile: user_grpc.ProfileToPb(profile),
|
||||
Profile: user_grpc.ProfileToPb(profile, s.assetsAPIDomain),
|
||||
Details: object_grpc.ToViewDetailsPb(
|
||||
profile.Sequence,
|
||||
profile.CreationDate,
|
||||
|
Reference in New Issue
Block a user