Skip to content
Snippets Groups Projects
Commit 281ec271 authored by Cosmin Cojocar's avatar Cosmin Cojocar
Browse files

Update also to a list of empty redirect URIs and Peers

parent 9d1ec6c3
No related branches found
No related tags found
No related merge requests found
...@@ -86,13 +86,12 @@ func (d dexAPI) UpdateClient(ctx context.Context, req *api.UpdateClientReq) (*ap ...@@ -86,13 +86,12 @@ func (d dexAPI) UpdateClient(ctx context.Context, req *api.UpdateClientReq) (*ap
} }
err := d.s.UpdateClient(req.Id, func(old storage.Client) (storage.Client, error) { err := d.s.UpdateClient(req.Id, func(old storage.Client) (storage.Client, error) {
if req.RedirectUris != nil && len(req.RedirectUris) > 0 { if req.RedirectUris != nil {
old.RedirectURIs = req.RedirectUris old.RedirectURIs = req.RedirectUris
} }
if req.TrustedPeers != nil && len(req.TrustedPeers) > 0 { if req.TrustedPeers != nil {
old.TrustedPeers = req.TrustedPeers old.TrustedPeers = req.TrustedPeers
} }
old.Public = req.Public
if req.Name != "" { if req.Name != "" {
old.Name = req.Name old.Name = req.Name
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment