Skip to content
This repository has been archived by the owner on Mar 3, 2022. It is now read-only.

RateSvc duplicates starring for the same user #9

Closed
prydonius opened this issue Oct 26, 2017 · 0 comments
Closed

RateSvc duplicates starring for the same user #9

prydonius opened this issue Oct 26, 2017 · 0 comments
Assignees

Comments

@prydonius
Copy link
Contributor

prydonius commented Oct 26, 2017

In https://github.com/kubeapps/ratesvc/blob/master/handler.go#L117 we aren't checking if the current uid is already in the list of StargazerIDs for item fetched from database. This means multiple requests to the PUT endpoint from the same user token with {has_starred: true} can create duplicate entries of the uid in the list.

If the uid is already in the list, we should no-op.

See also vmware-archive/hub#7

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants