Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Repo Voting #9

Closed
Tracked by #4
bdougie opened this issue Apr 17, 2023 · 7 comments
Closed
Tracked by #4

Repo Voting #9

bdougie opened this issue Apr 17, 2023 · 7 comments
Assignees

Comments

@bdougie
Copy link
Member

bdougie commented Apr 17, 2023

https://github.com/open-sauced/api.opensauced.pizza/issues/122

@bdougie
Copy link
Member Author

bdougie commented Apr 20, 2023

If either of you have bandwidth to assist in triaging the voting blocker in the API let me know. @Anush008 @diivi

Seems like it just needs a deeper look to get this unblocked.

@diivi
Copy link
Collaborator

diivi commented Apr 20, 2023

I will setup the project locally and try to fix this bug tonight.

@Anush008 Anush008 mentioned this issue Apr 21, 2023
19 tasks
@diivi
Copy link
Collaborator

diivi commented Apr 22, 2023

Now that I think about it, the backend bug isn't a blocker for this feature. We can implement this anyway; and when the bug gets fixed, we won't have to change our code. I'll get started with this soon.

@diivi diivi self-assigned this Apr 28, 2023
@diivi
Copy link
Collaborator

diivi commented May 5, 2023

I was going through api.opensauced docs to implement this - I want an endpoint to check if a user has voted a repo already. In my demo I was doing it by calling the /listuservoted endpoint but that's redundant and good for small demos only.

Is there an endpoint like GET /repos/owner/vote from which I can check if a user has voted a repo? cc @0-vortex

@0-vortex
Copy link

0-vortex commented May 5, 2023

I was going through api.opensauced docs to implement this - I want an endpoint to check if a user has voted a repo already. In my demo I was doing it by calling the /listuservoted endpoint but that's redundant and good for small demos only.

Is there an endpoint like GET /repos/owner/vote from which I can check if a user has voted a repo? cc @0-vortex

No, and, unfortunately, the current design across the frontend implies we somehow cache the listUser{Action} routes with a potential limit of 1000. This can be done/checked in the background 🚀

@diivi
Copy link
Collaborator

diivi commented May 5, 2023

No, and, unfortunately, the current design across the frontend implies we somehow cache the listUser{Action} routes with a potential limit of 1000. This can be done/checked in the background 🚀

So you recommend getting 1000 vote entries from the api for the user and finding the repo in one of those?

@0-vortex
Copy link

0-vortex commented May 6, 2023

So you recommend getting 1000 vote entries from the api

Get all current user has voted, 1000 at a time (per page limit)

for the user and finding the repo in one of those?

Yes, it could be set up as a Map or Set and be very efficient

@diivi diivi mentioned this issue May 6, 2023
19 tasks
@bdougie bdougie added this to the Extension Features milestone May 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

No branches or pull requests

4 participants