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

[ Fix : "Follow +" button in Tutorial View Implemented ] #1204

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rohitPandey469
Copy link

Description

What was happening?
On clicking the follow + button at '/tutorial/tutorial_id', it wasn't doing anything.
How solved it?
As soon as the page loads, fetched profile data of the current user and, using getUserProfileData action which takes 'ID of the tutorial' as parameters populated the user field, then used addUserFollower and isUserFollower actions for further basic use case.
While fixing the getUserProfileData action, I came across checkUserHandleExists which was finding the handle in cl_user_handle collection but a collection like this is not implemented anywhere, so I changed it to check under cl_user and instead of passing the created_by handle I am passing the uid of the user. And to get the uid of the user I stored it into the tutorials collection at the time of it's creation.

Related Issue

Fixes #1199

Motivation and Context

Dynamism

How Has This Been Tested?

Tested locally on my machine.

Video:

I created a tutorial by using codelabz user ID and then switched to Mahendar's id, then clicked on the follow + button and it stored the following and followers relation under user_followers collection.

Codelabz.-.Google.Chrome.2024-02-16.21-40-58.mp4

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

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

Successfully merging this pull request may close these issues.

[ Feat : Add the ' Follow + ' Button Functionality at '/tutorial/tutorial_id' ]
1 participant