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

166816223 user can report article #38

Merged
merged 1 commit into from
Jul 19, 2019

Conversation

FrankChinedu
Copy link
Contributor

Description

report article gives user the ability to report article that violates terms and condition

Type of change

Please select the relevant option

  • Bug fix (non-breaking changes which fixes an issue)
  • New feature (non-breaking changes which adds functionality)
  • Breaking change (fix or feature that could cause existing functionality to not work as expected)
  • This change requires a documentation update
  • Chore

How Has This Been Tested?

please describe the test that you ran to verify your changes

  • End to end
  • Integration
  • Unit test

Checklist:

  • My code follows the style guidelines of this project
  • I have linted my code prior to submission
  • I have made corresponding changes to the documentation
  • My changes generates no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes

Pivotal Tracker

#166816223

);

router.get(
'/:id/article',
Copy link
Contributor

@kevoese kevoese Jul 17, 2019

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.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

thank you

@FrankChinedu FrankChinedu force-pushed the feature/166816223-user-can-report-an-article branch 2 times, most recently from 74f6ce6 to 399eae6 Compare July 17, 2019 13:24
@@ -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';
Copy link

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

@vincentayorinde vincentayorinde temporarily deployed to demeter-ah-backend-stagi-pr-38 July 17, 2019 13:28 Inactive
@FrankChinedu FrankChinedu force-pushed the feature/166816223-user-can-report-an-article branch from 399eae6 to 37b3dc4 Compare July 17, 2019 13:36
@FrankChinedu FrankChinedu temporarily deployed to demeter-ah-backend-stagi-pr-38 July 17, 2019 13:36 Inactive
@FrankChinedu FrankChinedu force-pushed the feature/166816223-user-can-report-an-article branch from 37b3dc4 to 35f1901 Compare July 18, 2019 07:19
@FrankChinedu FrankChinedu temporarily deployed to demeter-ah-backend-stagi-pr-38 July 18, 2019 07:19 Inactive
@FrankChinedu FrankChinedu force-pushed the feature/166816223-user-can-report-an-article branch from 35f1901 to eb02cb1 Compare July 18, 2019 12:19

describe('ARTICLE FLAG', () => {
beforeEach(async () => {
mockDeleteImage = sinon.stub(utils, 'deleteImage')
Copy link

Choose a reason for hiding this comment

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

Missing semicolon semi

@FrankChinedu FrankChinedu temporarily deployed to demeter-ah-backend-stagi-pr-38 July 18, 2019 12:19 Inactive
@FrankChinedu FrankChinedu force-pushed the feature/166816223-user-can-report-an-article branch from eb02cb1 to 41c332b Compare July 18, 2019 12:23
@FrankChinedu FrankChinedu temporarily deployed to demeter-ah-backend-stagi-pr-38 July 18, 2019 12:23 Inactive
@FrankChinedu FrankChinedu force-pushed the feature/166816223-user-can-report-an-article branch from 41c332b to c4418ee Compare July 18, 2019 12:25
  - add report migration
  - add flagged column in article table
  - add Report Model
  - add report route
  - add report Controller
  - add tests
[Delivers #166816223]
@FrankChinedu FrankChinedu force-pushed the feature/166816223-user-can-report-an-article branch from c4418ee to d9f8b3c Compare July 19, 2019 08:14
@andela-johia andela-johia merged commit 1889c2c into staging Jul 19, 2019
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

5 participants