From f8dee0065af8ceb11aebd77d727315ca4742a79c Mon Sep 17 00:00:00 2001 From: Erik Kristensen Date: Tue, 27 Aug 2024 10:46:04 -0600 Subject: [PATCH] fix(application-federated-credential): fix nil pointer and display name --- resources/application-federated-credential.go | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/resources/application-federated-credential.go b/resources/application-federated-credential.go index 108fd42..40ae37f 100644 --- a/resources/application-federated-credential.go +++ b/resources/application-federated-credential.go @@ -31,11 +31,11 @@ func init() { type ApplicationFederatedCredential struct { *BaseResource `property:",inline"` - client *msgraph.ApplicationsClient - ID *string - Name *string - AppID *string - AppUniqueName *string + client *msgraph.ApplicationsClient + ID *string + Name *string + AppID *string + DisplayName *string } func (r *ApplicationFederatedCredential) Filter() error { @@ -52,7 +52,7 @@ func (r *ApplicationFederatedCredential) Properties() types.Properties { } func (r *ApplicationFederatedCredential) String() string { - return fmt.Sprintf("%s -> %s", *r.AppUniqueName, *r.Name) + return fmt.Sprintf("%s -> %s", ptr.ToString(r.DisplayName), ptr.ToString(r.Name)) } // ------------------------------------------------------------------------------------------------------- @@ -92,11 +92,11 @@ func (l ApplicationFederatedCredentialLister) List(ctx context.Context, o interf BaseResource: &BaseResource{ Region: ptr.String("global"), }, - client: client, - ID: cred.ID, - Name: cred.Name, - AppID: entity.ID(), - AppUniqueName: entity.UniqueName, + client: client, + ID: cred.ID, + Name: cred.Name, + AppID: entity.ID(), + DisplayName: entity.DisplayName, }) } }