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

#166790008 List Users Functionality #55

Merged
merged 1 commit into from
Jul 24, 2019

Conversation

Hervera
Copy link
Contributor

@Hervera Hervera commented Jul 20, 2019

What does this PR do?

Lists users functionality

Description of Task to be completed

  • add a route
  • add functionality of listing users
  • add tests
  • add a documentation

How should this be manually tested?

  1. Run the following commands in the terminal
git clone https://github.com/andela/ah-92explorers-backend.git
cd ah-92explorers-backend
git checkout ft-list-users-functionality-166790008
npm install
npm start
  1. Create a .env file and add the following snippets
DATABASE_URL=postgresql://dbusername:dbpassword@localhost:5432/dbname
DATABASE_TEST=postgresql://dbusername:dbpassword@localhost:5432/dbnamefortest
SECRET=whatever you want it to be
  1. Install sequelize globally
sudo npm install -g sequelize
  1. Create a database using sequelize db:create
  2. Install and setup Postman to consume list users endpoint
  3. Run the following requests in Postman using localhost:3000

Endpoint

Method Endpoint Task
GET /api/list-users List users functionality

Any background context you want to provide?

N/A

What are the relevant pivotal tracker stories?

#166790008

Screenshots (if appropriate)

Screen Shot 2019-07-20 at 08 53 18

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I don't have more than 3 major commits on this PR

@Hervera Hervera requested review from kodek-sleuth, niyoceles and elemanhillary-zz and removed request for kodek-sleuth July 20, 2019 06:54
@coveralls
Copy link

coveralls commented Jul 20, 2019

Coverage Status

Coverage decreased (-0.2%) to 91.983% when pulling 9bf0014 on ft-list-users-functionality-166790008 into 05b52b6 on develop.

@Hervera Hervera force-pushed the ft-list-users-functionality-166790008 branch from c588112 to 8f6acb9 Compare July 20, 2019 07:03
@@ -0,0 +1,97 @@
import models from '../models';
Copy link
Contributor

Choose a reason for hiding this comment

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

Remove this file ratings.js in controllers will no longer be used.

models/users.js Outdated
@@ -22,21 +24,26 @@ export default (sequelize, DataTypes) => {
isEmail: true
}
},
provider: { type: DataTypes.STRING },
Copy link
Contributor

Choose a reason for hiding this comment

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

Please add this column on users table provider: { type: DataTypes.STRING },

@Hervera Hervera requested a review from niyoceles July 23, 2019 07:45
@Hervera Hervera force-pushed the ft-list-users-functionality-166790008 branch 2 times, most recently from 025c6cc to 211f37a Compare July 23, 2019 07:51
Copy link
Contributor

@elemanhillary-zz elemanhillary-zz left a comment

Choose a reason for hiding this comment

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

ready for merge

Copy link
Contributor

@elemanhillary-zz elemanhillary-zz left a comment

Choose a reason for hiding this comment

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

resolve merge conflicts

@elemanhillary-zz elemanhillary-zz dismissed their stale review July 23, 2019 11:18

request changes

@elemanhillary-zz elemanhillary-zz self-requested a review July 23, 2019 15:20
@Hervera Hervera force-pushed the ft-list-users-functionality-166790008 branch from 211f37a to 50f9dcb Compare July 23, 2019 15:48
done();
});
});
});
Copy link

Choose a reason for hiding this comment

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

Newline required at end of file but not found eol-last

@Hervera Hervera force-pushed the ft-list-users-functionality-166790008 branch from 50f9dcb to 928797f Compare July 23, 2019 16:24
niyoceles
niyoceles previously approved these changes Jul 23, 2019
Copy link
Contributor

@elemanhillary-zz elemanhillary-zz left a comment

Choose a reason for hiding this comment

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

ready for merge

IsaiahRn
IsaiahRn previously approved these changes Jul 23, 2019
Copy link
Contributor

@IsaiahRn IsaiahRn left a comment

Choose a reason for hiding this comment

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

ready to be merged

@Hervera Hervera force-pushed the ft-list-users-functionality-166790008 branch from 928797f to 712bb91 Compare July 24, 2019 08:49
@elemanhillary-zz elemanhillary-zz self-requested a review July 24, 2019 08:56
Copy link
Contributor

@elemanhillary-zz elemanhillary-zz left a comment

Choose a reason for hiding this comment

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

ready for merge

niyoceles
niyoceles previously approved these changes Jul 24, 2019
Copy link
Contributor

@IsaiahRn IsaiahRn left a comment

Choose a reason for hiding this comment

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

fix merge conflicts

- add a route
- add functionality of listing users
- add tests
- add a documentation

[Finishes #166790008]
@Hervera Hervera dismissed stale reviews from niyoceles and elemanhillary-zz via 9bf0014 July 24, 2019 10:18
@Hervera Hervera force-pushed the ft-list-users-functionality-166790008 branch from 712bb91 to 9bf0014 Compare July 24, 2019 10:18
@Hervera Hervera requested a review from IsaiahRn July 24, 2019 10:19
@codeclimate
Copy link

codeclimate bot commented Jul 24, 2019

Code Climate has analyzed commit 9bf0014 and detected 0 issues on this pull request.

The test coverage on the diff in this pull request is 100.0% (50% is the threshold).

This pull request will bring the total coverage in the repository to 98.5% (0.0% change).

View more on Code Climate.

Copy link
Contributor

@elemanhillary-zz elemanhillary-zz left a comment

Choose a reason for hiding this comment

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

ready for merge

@dmithamo dmithamo merged commit 703a0fd into develop Jul 24, 2019
@dmithamo dmithamo deleted the ft-list-users-functionality-166790008 branch July 24, 2019 11:57
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.

None yet

6 participants