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

Article, Followers Feature #4

Closed
8 tasks done
bryanwong8 opened this issue May 21, 2020 · 0 comments
Closed
8 tasks done

Article, Followers Feature #4

bryanwong8 opened this issue May 21, 2020 · 0 comments
Assignees
Labels
backend This is a backend issue
Projects
Milestone

Comments

@bryanwong8
Copy link
Contributor

bryanwong8 commented May 21, 2020

Is your feature request related to a problem? Please describe.
Adjust the Following system for UserProfile.
Add the isPublished field to Articles and adjust logic for that.

Describe the solution you'd like

  • Adjust the UserProfile class function follow to append to the followings column.
  • (Hackathon) Add the following columns to the User model in backend/conduit/user/models.py:
    • occupation: Text
    • githubLink: String(100)
    • twitterLink: String(100)
    • linkedInLink: String(100)
    • website: Text
    • The default for all of them should be an empty string
  • Add bookmarkers field to Articles. This should be a relationship between Articles and UserProfiles
  • (Hackathon) Modify the update_user route in backend/conduit/user/views.py to take account of the newly added fields.
  • (Hackathon) Create a route to return the user's followers in backend/conduit/profile/views.py
    • This should return the user's follows column.
  • (Hackathon) Create a route to return the user's followings in backend/conduit/profile/views.py
    • This should return all the users that follow the targeted user but the targeted user does not follow them back
  • Create a route to add an Article to the bookmarks column for UserProfile
    • You should create a class function to add the article to the bookmarks column
  • Add the isPublished column to the Article model in backend/conduit/articles/models.py
    • Add the published field in the get_articles route in backend/conduit/articles/views.py kwargs.
    • If the published field is "true", return published articles only, else return unpublished articles. If it is "false" return unpublished articles only. If it is "all", then return all articles from the author.
  • Adjust the test_get_articles_by_author in backend/tests/test_articles.py to account for the new query changes

Additional context

  • (Hackathon) If the current user that the person is following allows follows the current user, then append the user to the followers column and remove from the following column. Should adjust the UserProfile follow class function
  • If the current user unfollows someone, then removed that user from the followers column to the following column. Should adjust the UserProfile unfollow class function.
@project-bot project-bot bot added this to To do in Bit Project May 21, 2020
@bryanwong8 bryanwong8 changed the title Following and Article adjustments Article, Followers and CommentReply Feature May 21, 2020
@bryanwong8 bryanwong8 added the backend This is a backend issue label May 22, 2020
@bryanwong8 bryanwong8 mentioned this issue May 22, 2020
2 tasks
@bryanwong8 bryanwong8 changed the title Article, Followers and CommentReply Feature Article, Followers Feature May 24, 2020
@bryanwong8 bryanwong8 removed this from To do in Bit Project May 28, 2020
@bryanwong8 bryanwong8 added this to To do in Dev Team via automation May 28, 2020
@bryanwong8 bryanwong8 added this to the Week 2 milestone May 28, 2020
@bryanwong8 bryanwong8 added the staging Issue merged into staging label Jun 2, 2020
Dev Team automation moved this from To do to Done Jun 19, 2020
@bryanwong8 bryanwong8 removed the staging Issue merged into staging label Jun 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend This is a backend issue
Projects
Dev Team
  
Done
Development

No branches or pull requests

2 participants