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

#162163282 A user can report Articles that violate terms #32

Merged
merged 1 commit into from
Dec 21, 2018

Conversation

kafuuma
Copy link
Contributor

@kafuuma kafuuma commented Dec 20, 2018

What does this PR do?

This PR delivers a feature for users to report articles that violate terms

Description of the tasks to be completed?

  • A logged in user can report articles
  • If an article is reported more than five times, it is removed from published articles
  • Only Admin/super users can view a list of reported articles
  • An admin/superuser can revert an improperly report article
  • An admin user can delete an article that has been reported and proved to violate terms

End points workin

- POST "/api/articles/<str:slug>/report/"
- DELETE "/api/articles/<str:slug>/report/"
- PUT "/api/articles/<str:slug>/revert/"
- GET "/api/reported/"

How should this be manually tested?

- Clone repository
- create a virtual environment
- Install requirements `pip install -r requirements.txt`
- Run the project `python manage.py runserver`
Paste URL in postman: `http://localhost:8000/api/articles/<str:slug>/report/`
Report body
{
	"report":{
		"reason":"this article has been plagiarised"
	}
}

Screenshots

  1. Report an article

rep1

  1. List reported articles

report

What are the relevant pivotal tracker stories

#162163282

@kafuuma kafuuma force-pushed the ft-user-report-article-162163282 branch from 65815a2 to 6611967 Compare December 20, 2018 15:33
@kafuuma kafuuma changed the title feat(Articles):Users can report articles #162163282 A users can report Articles that violate terms Dec 20, 2018
@kafuuma
Copy link
Contributor Author

kafuuma commented Dec 20, 2018

@collin5 , In this PR I have added functionality for the feedback you gave me.

I have abandoned the previous branch and PR because It had merge conflicts that we debugged the whole and failed to fix

@kafuuma kafuuma force-pushed the ft-user-report-article-162163282 branch 3 times, most recently from ba581c1 to d1d2781 Compare December 20, 2018 16:39
This commit delivers a feature for user to report
articles that violate terms of service

[Delivers #162163282]
@kafuuma kafuuma force-pushed the ft-user-report-article-162163282 branch from d1d2781 to 8adabe4 Compare December 20, 2018 17:01
@kafuuma kafuuma changed the title #162163282 A users can report Articles that violate terms #162163282 A user can report Articles that violate terms Dec 20, 2018
Copy link
Collaborator

@bibangamba bibangamba left a comment

Choose a reason for hiding this comment

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

👍

@collin5 collin5 merged commit 5d21ccc into develop Dec 21, 2018
@collin5 collin5 deleted the ft-user-report-article-162163282 branch December 21, 2018 08:47
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.

5 participants