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

Add isDraft column when fetching articles #71

Open
wants to merge 7 commits into
base: develop
Choose a base branch
from

Conversation

andrewinsoul
Copy link

What does this PR do?

This PR adds necessary columns when a user tries to get all his articles

Description of Task completed

  • Added isDraft columns and readTime columns to the query when a user get his articles
  • Removed the isDraft filter when fetching articles belonging to a user.

@kingisaac95 kingisaac95 changed the title fix a bug when a user tries to get his articles Add isDraft column when fetching articles Jan 31, 2019
@@ -237,7 +238,6 @@ class ArticleController {

if (req.originalUrl === '/api/v1/articles/user') {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Get drafts from /api/v1/articles/user/?isDraft=true or false

@kingisaac95
Copy link

@andrewinsoul You are yet to implement the change I requested. Any reasons?

};
const offset = (paginate.page * paginate.limit) - paginate.limit;
const offset = paginate.page * paginate.limit - paginate.limit;

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unexpected mix of '*' and '-' no-mixed-operators

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.

None yet

3 participants