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

#159328442 Create GET /entries/:id endpoint #27

Merged
merged 7 commits into from
Aug 2, 2018

Conversation

olusoladavid
Copy link
Owner

What does this PR do?

Creates the GET /entries/:id endpoint for users to fetch a single entry

Description of Task to be completed

  • Add the relevant database queries
  • Ensure failing tests pass
  • Optimize database and controller operations

How should this be manually tested?

What are the relevant pivotal tracker stories?

#159328442

- Create SQL queries
- Verify JWT
- Create GET endpoint controller
- Return array of entries

[Delivers #159352571]
- Changes were made to ft-login-endpoint-159328012
- Merge the changes to relect in ft-get-all-entries-159352571
- Create SQL queries
- Create POST endpoint
- Validate user inputs
- Return JWT

[Delivers #159328304]
- Create SQL queries
- Create GET endpoint
- Verify JWT
- Return single entry

[Delivers #159328442]
@coveralls
Copy link

Pull Request Test Coverage Report for Build 93

  • 32 of 39 (82.05%) changed or added relevant lines in 4 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-4.4%) to 82.857%

Changes Missing Coverage Covered Lines Changed/Added Lines %
server/utils/verifyToken.js 9 10 90.0%
server/controllers/entryController.js 18 24 75.0%
Totals Coverage Status
Change from base Build 84: -4.4%
Covered Lines: 90
Relevant Lines: 102

💛 - Coveralls

@@ -93,7 +93,7 @@ describe('/POST /auth/login', () => {
expect(res).to.have.status(200);
expect(res.body).to.be.an('object');
expect(res.body).to.have.property('token');
({ token } = res.body.token);
token = res.body.token;

Choose a reason for hiding this comment

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

deconstruct here too

@olusoladavid olusoladavid merged commit 099dc1a into develop Aug 2, 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

3 participants