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

Create GetUserArticles for published, unpublished, and all articles #8

Open
1 task done
bryanwong8 opened this issue May 9, 2020 · 0 comments
Open
1 task done
Labels
backend backend feature
Milestone

Comments

@bryanwong8
Copy link
Contributor

bryanwong8 commented May 9, 2020

Is your feature request related to a problem? Please describe.
Create routes for the User to fetch all the articles that they have whether it is published or unpublished.

Describe the solution you'd like
Create the Route:

  • /articles/me/<string:status>
    Status could be "all, published, unpublished" or it status can be None as well.

Should be placed in one route called FetchArticleStatus. The published, unpublished and all should be determined as a query param called status.

Additional context

  • Create this route in the Article's routes.py folder.
  • If no status is given, then query for all the current_user's articles, which can be accessed with through the session. Return a max of 30 articles
  • If published status is given then query for all the current_user's published articles. Return max of 30.
  • If unpublished status is given then query for all the current_user's unpublished articles. Return max of 30.
  • If all status is given then query for all the current_user's articles. Return max of 30.

Miscellaneous

  • Document and test route in Postman in the Articles folder
@bryanwong8 bryanwong8 added this to the Week 1 milestone May 9, 2020
@bryanwong8 bryanwong8 added the backend backend feature label May 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend backend feature
Projects
None yet
Development

No branches or pull requests

1 participant