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

#162163173 Fix users unable to see likes and dislikes in articles: #28

Closed
wants to merge 1 commit into from

Conversation

ekumamait
Copy link

What does this PR do?
Change Article serializer on view for articles list to display likes and dislikes.

Description of Task to be completed?
Apparently, users are not able to view the likes and dislikes an articles has because the Article serializer doesn't include those fields. This PR fixes this bug by adding those fields to the ArticlesSerializer.

How should this be manually tested?
Make migrations: ./manage.py makemigrations
Migrate: ./manage.py migrate
Run the server: ./manage.py runserver

Like an article
POST http://127.0.0.1:8000/api/articles/like/<slug>

Dislike an article

POST http://127.0.0.1:8000/api/articles/dislike/<slug>

What are the relevant pivotal tracker stories?
#162163170

Any background context you want to add?
You don’t need a body when using these endpoints so add the slug to add the like or dislike to a particular article once the user sends a post to the like endpoint the functionality will be triggered.

Screenshots (if appropriate)
image

@ekumamait ekumamait changed the title Feature(articles): liking and disliking articles: Bug(articles): liking and disliking articles: Dec 18, 2018
@ekumamait ekumamait changed the title Bug(articles): liking and disliking articles: Bug(articles): Fix liking and disliking articles: Dec 18, 2018
@ekumamait ekumamait changed the title Bug(articles): Fix liking and disliking articles: #162163173 Fix users unable to see likes and dislikes in articles: Dec 18, 2018
Copy link
Contributor

@alexkayabula alexkayabula left a comment

Choose a reason for hiding this comment

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

Nice work

Copy link
Contributor

@barema4 barema4 left a comment

Choose a reason for hiding this comment

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

looks nice

- add likes and dislikes fields in ArticleSerializer

[Finishes #162163173]
@ekumamait ekumamait force-pushed the bg-fix-like-dislike-article-162163173 branch from 82e017c to d524cef Compare December 18, 2018 11:50
@ekumamait ekumamait closed this Dec 18, 2018
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

5 participants