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

#164798298: Enable users favorite an article #30

Merged
merged 1 commit into from
Apr 17, 2019

Conversation

patrickf949
Copy link
Contributor

@patrickf949 patrickf949 commented Apr 17, 2019

What does this PR do?

Enables a user favorite an article on authors haven

Description of tasks to be done

  • Add models for favoriting and unfavoriting an article
  • Add serializers to handle favoriting and unfavoriting
    of an article
  • Add endpoints for manipulating favoriting and unfavoriting
    article
  • Add view for users to retrieve all fans
    of an article

How this should be manually tested?

Run the server and get to the swagger-docs on your browser using this link

After registering and logging in a user, create a few articles and favorite them using the post method to access the endpoint

  • /articles/{slug}/favorite/
  • Use the get method for the same enpoint to get all users who have favorited a particular article

Screenshots

After favoriting an article expect a result like this

Screenshot 2019-04-17 at 06 45 01

Fans of an article are returned this way

Screenshot 2019-04-17 at 06 47 13

An article is returned with the number of times it has been favorited
Screenshot 2019-04-17 at 14 33 51

A user profile is returned with the articles he has favorited before

Screenshot 2019-04-17 at 14 40 54

Unfavoriting an article returns a message similar to this

Screenshot 2019-04-17 at 14 42 29

#164798298

@Genza999 Genza999 temporarily deployed to ah-backend-prime-staging-pr-30 April 17, 2019 03:49 Inactive
@patrickf949 patrickf949 force-pushed the ft-users-favorite-articles-164798298 branch from a88db22 to 010bc53 Compare April 17, 2019 04:38
@Genza999 Genza999 temporarily deployed to ah-backend-prime-staging-pr-30 April 17, 2019 04:38 Inactive
@patrickf949 patrickf949 force-pushed the ft-users-favorite-articles-164798298 branch from 010bc53 to 48bbcb5 Compare April 17, 2019 09:47
@Genza999 Genza999 temporarily deployed to ah-backend-prime-staging-pr-30 April 17, 2019 09:47 Inactive
@patrickf949 patrickf949 force-pushed the ft-users-favorite-articles-164798298 branch from 48bbcb5 to cffdd45 Compare April 17, 2019 09:56
@Genza999 Genza999 temporarily deployed to ah-backend-prime-staging-pr-30 April 17, 2019 09:56 Inactive
@patrickf949 patrickf949 force-pushed the ft-users-favorite-articles-164798298 branch from cffdd45 to f18b1b6 Compare April 17, 2019 10:05
@Genza999 Genza999 temporarily deployed to ah-backend-prime-staging-pr-30 April 17, 2019 10:05 Inactive
@patrickf949 patrickf949 force-pushed the ft-users-favorite-articles-164798298 branch from f18b1b6 to ff5ac9d Compare April 17, 2019 10:53
@Genza999 Genza999 temporarily deployed to ah-backend-prime-staging-pr-30 April 17, 2019 10:53 Inactive
- Add models for favoriting and unfavoriting an article
- Add serializers to handle favoriting and unfavoriting
  of an article
- Add endpoints for manipulating favoriting and unfavoriting
  article
- Add view for users to retrieve all fans
  of an article

[Maintains #164798298]
Copy link
Contributor

@e-ian e-ian left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link

@inno-asiimwe inno-asiimwe left a comment

Choose a reason for hiding this comment

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

LGTM

@inno-asiimwe inno-asiimwe merged commit 282f815 into develop Apr 17, 2019
@inno-asiimwe inno-asiimwe deleted the ft-users-favorite-articles-164798298 branch April 17, 2019 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants