-
Notifications
You must be signed in to change notification settings - Fork 8
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
Conversation
- add more test cases - secure route
…into chore/secure-like-route
@@ -0,0 +1,14 @@ | |||
import express from 'express'; |
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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 => { |
There was a problem hiding this comment.
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
…into chore/secure-like-route
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
How Has This Been Tested?
Checklist:
PT-ID
N/A
Screenshots
N/A
Background
N/A
Questions:
N/A
PT-ID
Screenshots
Questions: