mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-12 01:37:31 +00:00
fix: return absolute asset urls (#3676)
This commit is contained in:
@@ -15,7 +15,7 @@ func (s *Server) GetMyProfile(ctx context.Context, req *auth_pb.GetMyProfileRequ
|
||||
return nil, err
|
||||
}
|
||||
return &auth_pb.GetMyProfileResponse{
|
||||
Profile: user_grpc.ProfileToPb(profile, s.assetsAPIDomain),
|
||||
Profile: user_grpc.ProfileToPb(profile, s.assetsAPIDomain(ctx)),
|
||||
Details: object_grpc.ToViewDetailsPb(
|
||||
profile.Sequence,
|
||||
profile.CreationDate,
|
||||
|
@@ -1,10 +1,12 @@
|
||||
package auth
|
||||
|
||||
import (
|
||||
"context"
|
||||
"time"
|
||||
|
||||
"google.golang.org/grpc"
|
||||
|
||||
"github.com/zitadel/zitadel/internal/api/assets"
|
||||
"github.com/zitadel/zitadel/internal/api/authz"
|
||||
"github.com/zitadel/zitadel/internal/api/grpc/server"
|
||||
"github.com/zitadel/zitadel/internal/auth/repository"
|
||||
@@ -28,7 +30,7 @@ type Server struct {
|
||||
query *query.Queries
|
||||
repo repository.Repository
|
||||
defaults systemdefaults.SystemDefaults
|
||||
assetsAPIDomain string
|
||||
assetsAPIDomain func(context.Context) string
|
||||
userCodeAlg crypto.EncryptionAlgorithm
|
||||
externalSecure bool
|
||||
auditLogRetention time.Duration
|
||||
@@ -42,7 +44,6 @@ func CreateServer(command *command.Commands,
|
||||
query *query.Queries,
|
||||
authRepo repository.Repository,
|
||||
defaults systemdefaults.SystemDefaults,
|
||||
assetsAPIDomain string,
|
||||
userCodeAlg crypto.EncryptionAlgorithm,
|
||||
externalSecure bool,
|
||||
auditLogRetention time.Duration,
|
||||
@@ -52,7 +53,7 @@ func CreateServer(command *command.Commands,
|
||||
query: query,
|
||||
repo: authRepo,
|
||||
defaults: defaults,
|
||||
assetsAPIDomain: assetsAPIDomain,
|
||||
assetsAPIDomain: assets.AssetAPI(externalSecure),
|
||||
userCodeAlg: userCodeAlg,
|
||||
externalSecure: externalSecure,
|
||||
auditLogRetention: auditLogRetention,
|
||||
|
@@ -20,7 +20,7 @@ func (s *Server) GetMyUser(ctx context.Context, _ *auth_pb.GetMyUserRequest) (*a
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &auth_pb.GetMyUserResponse{User: user_grpc.UserToPb(user, s.assetsAPIDomain)}, nil
|
||||
return &auth_pb.GetMyUserResponse{User: user_grpc.UserToPb(user, s.assetsAPIDomain(ctx))}, nil
|
||||
}
|
||||
|
||||
func (s *Server) RemoveMyUser(ctx context.Context, _ *auth_pb.RemoveMyUserRequest) (*auth_pb.RemoveMyUserResponse, error) {
|
||||
@@ -61,7 +61,7 @@ func (s *Server) ListMyUserChanges(ctx context.Context, req *auth_pb.ListMyUserC
|
||||
return nil, err
|
||||
}
|
||||
return &auth_pb.ListMyUserChangesResponse{
|
||||
Result: change.ChangesToPb(changes.Changes, s.assetsAPIDomain),
|
||||
Result: change.ChangesToPb(changes.Changes, s.assetsAPIDomain(ctx)),
|
||||
}, nil
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user