diff options
author | Matthew Somerville <matthew@mysociety.org> | 2015-02-19 17:46:06 +0000 |
---|---|---|
committer | Matthew Somerville <matthew@mysociety.org> | 2015-02-19 18:25:50 +0000 |
commit | 44c62365da9cb25f9bd320650632a20a1e266229 (patch) | |
tree | 58ccae303685a753972edc0ea8d68f7ce6533cc3 /perllib/FixMyStreet/App/Controller/Tokens.pm | |
parent | ee386f44aeebe7814f258b3ba4a756e903c89719 (diff) |
Add URLs for easy looking at confirmation pages.
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Tokens.pm')
-rw-r--r-- | perllib/FixMyStreet/App/Controller/Tokens.pm | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm index 00ac63599..c8a7531d6 100644 --- a/perllib/FixMyStreet/App/Controller/Tokens.pm +++ b/perllib/FixMyStreet/App/Controller/Tokens.pm @@ -28,6 +28,16 @@ problem but are not logged in. sub confirm_problem : Path('/P') { my ( $self, $c, $token_code ) = @_; + if ($token_code eq '_test_') { + $c->stash->{report} = { + id => 123, + title => 'Title of Report', + bodies_str => 'True', + url => '/report/123', + }; + return; + } + my $auth_token = $c->forward( 'load_auth_token', [ $token_code, 'problem' ] ); @@ -134,6 +144,11 @@ alert but are not logged in. sub confirm_alert : Path('/A') { my ( $self, $c, $token_code ) = @_; + if ($token_code eq '_test_') { + $c->stash->{confirm_type} = $c->req->params->{confirm_type}; + return; + } + my $auth_token = $c->forward( 'load_auth_token', [ $token_code, 'alert' ] ); # Load the problem @@ -169,6 +184,16 @@ update but are not logged in. sub confirm_update : Path('/C') { my ( $self, $c, $token_code ) = @_; + if ($token_code eq '_test_') { + $c->stash->{problem} = { + id => 123, + title => 'Title of Report', + bodies_str => 'True', + url => '/report/123', + }; + return; + } + my $auth_token = $c->forward( 'load_auth_token', [ $token_code, 'comment' ] ); |