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

User Social Media Routes update social medias one at a time #411

Open
dowhep opened this issue Feb 29, 2024 · 2 comments
Open

User Social Media Routes update social medias one at a time #411

dowhep opened this issue Feb 29, 2024 · 2 comments
Assignees

Comments

@dowhep
Copy link
Contributor

dowhep commented Feb 29, 2024

Ideally, the POST, PATCH, and DELETE routes should take in an array of social medias as requests and perform actions on all of them.

However, the current implementation takes in exactly one social media at a time. When the user edits multiple social medias, the current implementation would send multiple requests, which is slow, costly, and prone to error.

@dowhep
Copy link
Contributor Author

dowhep commented Feb 29, 2024

One potential thing to think about is that whether the route type should stay the same or not. Ex. Does adding a list of social media still count as a POST operation?

@ryanDing26 ryanDing26 self-assigned this Feb 29, 2024
@nik-dange
Copy link
Member

Yeah, a list of new social media URLs would be counted as a POST. An interesting case is if you add 2 new social media URLs, but you edit one other and remove yet another. In that case, I think it's up to the frontend to send the requests accordingly

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

No branches or pull requests

3 participants