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

Commit

Permalink
Merge pull request #3546 from gratipay/fix-user-dashboard
Browse files Browse the repository at this point in the history
point user review dashboard to ~new place
  • Loading branch information
rohitpaulk committed Jun 11, 2015
2 parents aa13dee + a521151 commit a3d4346
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 2 deletions.
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

0 comments on commit a3d4346

Please sign in to comment.