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

Change the Comments API to provide the user details along with the comments #1110

Closed
justdvnsh opened this issue May 23, 2021 · 9 comments · May be fixed by #1126
Closed

Change the Comments API to provide the user details along with the comments #1110

justdvnsh opened this issue May 23, 2021 · 9 comments · May be fixed by #1126
Assignees
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Type: Enhancement New feature or request.

Comments

@justdvnsh
Copy link

Is your feature request related to a problem? Please describe.

The comment API right now provides the userID as a parameter in the response. It needs to change to provide the user details such as username and email along with the comment response. A complete discussion can be found here. anitab-org/mentorship-android#1129

Describe the solution you'd like

User details come along with the comments response

Additional context

A complete discussion can be found here. anitab-org/mentorship-android#1129

@welcome
Copy link

welcome bot commented May 23, 2021

Hello there!👋 Welcome to the project!💖

Thank you and congrats 🎉 for opening your very first issue in this project.
AnitaB.org Open Source is an inclusive community, committed to creating a safe and positive environment 🌸 Please follow our Code Of Conduct 🙌
You can learn more about the community on our website and documentation repository.

You may submit a PR on the same if you like!
Please follow our Commit Message Style Guide and Coding Standards while sending PRs.
If you want to report a bug 🐞, please follow our bug_report.md template. Please make sure you include steps to reproduce it and be patient we will get back to you as soon as we can 👀

Also, feel free to join us on AnitaB.org Open Source Zulip Community 🤝 We have different streams for each active repository for discussions.👩🏻‍💻🧑🏻‍💻
For mentorship-backend, join #mentorship-system stream! Hope you have a great time here :)

@epicadk epicadk added Category: Coding Changes to code base or refactored code that doesn't fix a bug. Status: Available Issue was approved and available to claim or abandoned for over 3 days. Type: Enhancement New feature or request. labels May 23, 2021
@epicadk
Copy link
Member

epicadk commented May 23, 2021

@justdvnsh do you want to work on this?

@justdvnsh
Copy link
Author

@epicadk I don't think I'd be able to work on this. Would not be able to give in the time for this issue.

@RiddhiAthreya
Copy link
Contributor

@epicadk can I try working on this?

@epicadk epicadk removed the Status: Available Issue was approved and available to claim or abandoned for over 3 days. label Jun 15, 2021
@RiddhiAthreya
Copy link
Contributor

@justdvnsh can you tell me the exact endpoint you want changed?

@RiddhiAthreya
Copy link
Contributor

@justdvnsh @epicadk
About the structure of the response :

  • So do I include both the users in the task - the mentor and the mentee details in the response JSON?

  • Right now it's a list of comment objects being returned. I'm thinking of having a list with 2 key value pairs :-

        - comments :- value will contain a list of comment objects
    
        - users :-  value will contain a list with 2 key-value pairs -  user_id being the key and value being the details of the user
    

@epicadk
Copy link
Member

epicadk commented Jun 22, 2021

Sure that works or you could change the comment response to include the corresponding user within the comment. I think this way makes more sense.

@RiddhiAthreya
Copy link
Contributor

@epicadk but wouldn't that be sending a lot of redundant information? Since there are only 2 users involved, I'd be sending the same info over and over again. Response might become unnecessarily big.

@devkapilbansal
Copy link
Member

Duplicate issue #685

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Category: Coding Changes to code base or refactored code that doesn't fix a bug. Type: Enhancement New feature or request.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants