Skip to content

Commit

Permalink
Make user settings additive
Browse files Browse the repository at this point in the history
  • Loading branch information
jggoebel committed Oct 18, 2024
1 parent 5aa9aae commit 7bf2027
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion v3/services/authnsvc/internal/authnservice.go
Original file line number Diff line number Diff line change
Expand Up @@ -356,9 +356,15 @@ func (a AuthServer) UpdateSettings(user *userpb.User, newSettings map[string]str
return fmt.Errorf("bad parameters passed, %s", user.GetId())
}

settings := user.Settings

for i, setting := range newSettings {
settings[i] = setting
}

user = &userpb.User{
Id: user.GetId(),
Settings: newSettings,
Settings: settings,
}

_, err := a.userClient.UpdateUser(ctx, user)
Expand Down

0 comments on commit 7bf2027

Please sign in to comment.