Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

point user review dashboard to ~new place #3546

Merged
merged 3 commits into from
Jun 11, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tests/py/test_is_suspicious.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ def setUp(self):
self.bar = self.make_participant('bar', is_admin=True)

def toggle_is_suspicious(self):
self.client.GET('/~foo/toggle-is-suspicious.json', auth_as='bar')
self.client.POST('/~foo/toggle-is-suspicious.json', auth_as='bar')

def test_that_is_suspicious_defaults_to_None(self):
foo = self.make_participant('foo', claimed_time='now')
Expand Down
2 changes: 1 addition & 1 deletion www/dashboard/index.spt
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ title = _("Fraud Review Dashboard")
var row = $(this).parent();
var to = $(this).text() !== 'Good';
var username = row.attr('username');
var url = "/" + username + "/toggle-is-suspicious.json";
var url = "/~" + username + "/toggle-is-suspicious.json";

function success()
{
Expand Down
2 changes: 2 additions & 0 deletions www/~/%username/toggle-is-suspicious.json.spt
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ from gratipay.utils import get_participant
if not user.ADMIN:
raise Response(400)

request.allow('POST')

to = request.body.get('to')
if not to in ('true', 'false', None):
raise Response(400)
Expand Down