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

#165429968 User can get their bookmarked articles #108

Merged
merged 9 commits into from
Apr 23, 2019

Conversation

AnayoOleru
Copy link
Contributor

Description

Currently, users can bookmark articles, but they cannot get the articles they bookmarked. A user bookmarks articles to read them later or save them, but without the ability to get these bookmarked articles, they'll be saving articles for nothing. This P.R, adds the ability for a user to be able to get his/her articles they'd bookmarked.

Type of change

  • add a route
  • add a function to query the bookmark table
  • add test
  • add documentation

How Has This Been Tested?

  • Unit testing

Checklist:

  • add a route
  • add a function to query the bookmark table
  • add test
  • add documentation

PT-ID

#165429968

Screenshots

Screen Shot 2019-04-18 at 1 40 56 AM

Screen Shot 2019-04-18 at 1 41 21 AM

Questions:

N/A

Anayo Oleru added 2 commits April 18, 2019 01:41
- create route
- write test
- add middleware
- create controller
- add documentation

[Finishes 165429968]
- fix documentation

[Finishes 165429968]
const bookmarkController = { toggleBookmark };
const userGetTheirBookmarkArticles = async (req, res) => {
try {
const bookmarkedArticle = await Bookmark.findAll({
Copy link
Contributor

@rotimi-babalola rotimi-babalola Apr 18, 2019

Choose a reason for hiding this comment

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

This should be bookmarkedArticles @AnayoOleru

Anayo Oleru added 2 commits April 18, 2019 15:36
@AnayoOleru AnayoOleru force-pushed the feature/165429968-user-get-bookmark-articles branch from 3cf8368 to daaa14f Compare April 18, 2019 14:55
@Akinmyde Akinmyde temporarily deployed to hermes-ah-backend-stagi-pr-108 April 18, 2019 14:55 Inactive
@@ -62,5 +62,43 @@ const toggleBookmark = async (req, res) => {
}
};

const bookmarkController = { toggleBookmark };
const userGetTheirBookmarkArticles = async (req, res) => {
Copy link
Contributor

Choose a reason for hiding this comment

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

You can name this getBookMarkedArticlesForUser. userGetTheirBookmarkArticles is just awkward @AnayoOleru

Copy link
Contributor Author

Choose a reason for hiding this comment

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

You can name this getBookMarkedArticlesForUser. userGetTheirBookmarkArticles is just awkward @AnayoOleru

That's true. I've fixed it

@Akinmyde Akinmyde temporarily deployed to hermes-ah-backend-stagi-pr-108 April 18, 2019 18:24 Inactive
…into feature/165429968-user-get-bookmark-articles
@rotimi-babalola rotimi-babalola merged commit 185b2bd into develop Apr 23, 2019
@rotimi-babalola rotimi-babalola deleted the feature/165429968-user-get-bookmark-articles branch April 23, 2019 11:03
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