-
Notifications
You must be signed in to change notification settings - Fork 4
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
Refactor Follows API #510
Comments
I see your point and but decided more or less deliberately for the current design, but I am open for improvements: A few arguments from my point of view:
I would also be interested where exactly you see the complexity in the particular feature. |
I think the most complicated part is the URL design as it is not visible in the router that you are using a slug, but then the slug is magically added. I can understand that you want to avoid query parameters but as this url is not visible to users I think query parameters are ok. For further development we should decide which way to go, because, I think, it is also confusing to use different approaches inside one API. If we decide to stick to this we should consider to refactor the other Apps (e.g. reports) |
related to #629 |
@phillimorland Don't know what that is :) Please lable with reminder if it is important or close. |
this is ref in follow issue but this is bit general for current level of development so will close |
The Follows-API is working nicely but I think it is implemented rather complicated:
This makes it hard to understand the code to others and also is implemented differently then all the other API-Endpoints
Instead I would suggest to just have a Follows list, that allows POST. When the Follow-Button in the React-Component is clicked, it sends a POST-Request to the Followlist (includes the project and the enabledflag) -> there the create function checks if an entry for a current user already exists, if not it creates one, if yes it updates the existing one.
The initial value is added to the react component when it is called in the template tag, no GET request is needed.
@slomo what do you think? Would that work or did I miss something?
The text was updated successfully, but these errors were encountered: