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

#167164992 follow and unfollow user feature #34

Merged
merged 1 commit into from
Aug 23, 2019

Conversation

OvieMudi
Copy link
Contributor

@OvieMudi OvieMudi commented Aug 8, 2019

What does this PR do?

  • authenticated users can follow each other
  • authenticated users can unfollow each other

Description of Task to be completed?

  • Ensure the endpoint /api/v1/profile/<userId>/follow create a new user in the database when provided with appropriate fields

How should this be manually tested?

To test manually on your local computer:

  • run the following commands.
# Clone this repository
$ git clone https://github.com/andela/dahlia-ah-backend.git

# Navigate to the application folder
$ cd dahlia-ah-backend

# Checkout the branch
$ git checkout feature/167164992/users-follow-each-other

# Install dependencies
$ npm install

# Start the app in development mode
$ npm run dev:start
  • on Postman make an authorized request to /api/v1/profile/<userId>/follow

Note: See the screenshot below on how the request/response should look

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

#167164992

Screenshots

Screenshot 2019-08-08 at 12 08 45 PM

Screenshot 2019-08-08 at 12 09 32 PM

Screenshot 2019-08-08 at 12 13 11 PM

API Flowchart

Follow and unfollow features

@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 8, 2019 11:01 Inactive
@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from 41724c1 to 99ac590 Compare August 9, 2019 03:36
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 9, 2019 03:36 Inactive
@OvieMudi OvieMudi marked this pull request as ready for review August 9, 2019 03:42
Copy link
Contributor

@Nerocodes Nerocodes left a comment

Choose a reason for hiding this comment

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

LGTM

@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from 99ac590 to ee3c610 Compare August 16, 2019 19:28
tests/user.spec.js Outdated Show resolved Hide resolved
tests/user.spec.js Outdated Show resolved Hide resolved
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 16, 2019 19:29 Inactive
@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from ee3c610 to 50f3dd8 Compare August 16, 2019 19:34
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 16, 2019 19:34 Inactive
@Ukhu
Copy link
Contributor

Ukhu commented Aug 17, 2019

Kindly add a screenshot of your flowchart for this task and increase test coverage.

@OvieMudi
Copy link
Contributor Author

Kindly add a screenshot of your flowchart for this task and increase test coverage.

Thank you very much for this observation. I'm on it.

Copy link
Contributor

@allebd allebd left a comment

Choose a reason for hiding this comment

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

I observed that the flowchart attached does not describe the follow user feature

@OvieMudi
Copy link
Contributor Author

I observed that the flowchart attached does not describe the follow user feature

Thank you very much for that observation. That is obviously a mixup. I'll make changes as soon as I can.

@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from 50f3dd8 to 776d9ae Compare August 19, 2019 01:07
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 19, 2019 01:07 Inactive
Copy link
Contributor

@benisi benisi 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
Contributor

@profmcdan profmcdan left a comment

Choose a reason for hiding this comment

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

Implement the un-follow feature

@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from 776d9ae to 91b2806 Compare August 22, 2019 17:18
tests/user.spec.js Outdated Show resolved Hide resolved
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 22, 2019 17:18 Inactive
@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from 91b2806 to d810108 Compare August 23, 2019 00:01
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 23, 2019 00:01 Inactive
@OvieMudi OvieMudi changed the title #167164992 follow user feature #167164992 follow and unfollow user feature Aug 23, 2019
Copy link
Contributor

@profmcdan profmcdan left a comment

Choose a reason for hiding this comment

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

Attend to your reviews

@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from d810108 to d3f1d39 Compare August 23, 2019 09:42
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 23, 2019 09:43 Inactive
@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from d3f1d39 to 219171d Compare August 23, 2019 10:05
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 23, 2019 10:05 Inactive
@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from 219171d to d3b3368 Compare August 23, 2019 10:30
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 23, 2019 10:30 Inactive
@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from d3b3368 to fc2b714 Compare August 23, 2019 10:36
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 23, 2019 10:36 Inactive
@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from fc2b714 to a9b4f93 Compare August 23, 2019 10:42
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 23, 2019 10:43 Inactive
@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from a9b4f93 to 96b0b84 Compare August 23, 2019 10:52
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 23, 2019 10:52 Inactive
@OvieMudi OvieMudi force-pushed the feature/167164992/users-follow-each-other branch from 96b0b84 to f2d4ded Compare August 23, 2019 10:55
@Nerocodes Nerocodes temporarily deployed to ah-dahlia-staging-pr-34 August 23, 2019 10:55 Inactive
- write unit test for feature
- create database models and migrations
- write controller logic for adding followers
- create follow route with authorization
- update swagger docs
- add test for database error

[Delivers #167164992]

WIP: users can follow each other
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

7 participants