Skip to content

Commit

Permalink
Don't set URLs if they are already set as this a PATCH request
Browse files Browse the repository at this point in the history
  • Loading branch information
ewanharris committed Mar 30, 2023
1 parent fa48650 commit 31227f4
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions internal/cli/universal_login.go
Original file line number Diff line number Diff line change
Expand Up @@ -196,17 +196,11 @@ func updateUniversalLoginCmd(cli *cli) *cobra.Command {
}
}

logoURL := current.GetLogoURL()
if len(inputs.LogoURL) == 0 && logoURL != "" {
b.LogoURL = &logoURL
} else if len(inputs.LogoURL) != 0 {
if len(inputs.LogoURL) != 0 {
b.LogoURL = &inputs.LogoURL
}

favIconURL := current.GetFaviconURL()
if len(inputs.FaviconURL) == 0 && favIconURL != "" {
b.FaviconURL = &favIconURL
} else if len(inputs.FaviconURL) != 0 {
if len(inputs.FaviconURL) != 0 {
b.FaviconURL = &inputs.FaviconURL
}

Expand Down

0 comments on commit 31227f4

Please sign in to comment.