-
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
166816223 user can report article #38
166816223 user can report article #38
Conversation
routes/v1/reports.js
Outdated
); | ||
|
||
router.get( | ||
'/:id/article', |
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.
Good job on this PR. Following the convention from the other routes, it is better you use article slug in your params rather than the article id and also you don't need article at the end.
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.
thank you
74f6ce6
to
399eae6
Compare
routes/v1/articles.js
Outdated
@@ -3,6 +3,7 @@ import Validation from '../../validators/articles'; | |||
import Article from '../../controllers/articles'; | |||
import Middleware from '../../middlewares'; | |||
import Comment from '../../controllers/comments'; | |||
import report from '../../controllers/reports'; |
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.
'report' is defined but never used no-unused-vars
399eae6
to
37b3dc4
Compare
37b3dc4
to
35f1901
Compare
35f1901
to
eb02cb1
Compare
tests/routes/reports.spec.js
Outdated
|
||
describe('ARTICLE FLAG', () => { | ||
beforeEach(async () => { | ||
mockDeleteImage = sinon.stub(utils, 'deleteImage') |
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.
Missing semicolon semi
eb02cb1
to
41c332b
Compare
41c332b
to
c4418ee
Compare
- add report migration - add flagged column in article table - add Report Model - add report route - add report Controller - add tests [Delivers #166816223]
c4418ee
to
d9f8b3c
Compare
Description
report article gives user the ability to report article that violates terms and condition
Type of change
Please select the relevant option
How Has This Been Tested?
please describe the test that you ran to verify your changes
Checklist:
Pivotal Tracker
#166816223