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

Chore: secure like route #65

Merged
merged 7 commits into from
Apr 8, 2019
Merged

Conversation

amaechi-chuks
Copy link
Contributor

Description

Currently, our LIKE route is not secure and any user can access it. This PR secures the LIKE route with JWT tokens and is required before any user can have access to it.

Type of change

  • Chore(Secure like route)

How Has This Been Tested?

  • Unit testing
  • End to end testing

Checklist:

  • Secure like route
  • write test cases

PT-ID

N/A

Screenshots

N/A

Background

N/A

Questions:

N/A

PT-ID

Screenshots

Questions:

@@ -0,0 +1,14 @@
import express from 'express';

Choose a reason for hiding this comment

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

Parsing error: 'import' and 'export' may appear only with 'sourceType: module'

- remove dead codes
expect(res.body.message).to.equal('Successfuly added like');
done();
});
});

it('It should return a 200 if a user Unlike an article', done => {

Choose a reason for hiding this comment

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

Expected parentheses around arrow function argument having a body with curly braces arrow-parens

});
});

it('It should return a 201 if a user successfully an article', done => {

Choose a reason for hiding this comment

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

Expected parentheses around arrow function argument having a body with curly braces arrow-parens

it('should respond with a 201 for Successfully like an article', done => {
let token1;
describe('TEST LIKE', () => {
it('lgoin a user', done => {

Choose a reason for hiding this comment

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

Expected parentheses around arrow function argument having a body with curly braces arrow-parens

- test all the edge cases
done();
});
});
it('It should return a 401 error for an empty token', done => {

Choose a reason for hiding this comment

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

Expected parentheses around arrow function argument having a body with curly braces arrow-parens

done();
});
});
it('It should return a 403 error for an invalid token', done => {

Choose a reason for hiding this comment

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

Expected parentheses around arrow function argument having a body with curly braces arrow-parens

@Akinmyde Akinmyde temporarily deployed to hermes-ah-backend-stagin-pr-65 April 8, 2019 11:26 Inactive
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

4 participants