aboutsummaryrefslogtreecommitdiffstats
path: root/perllib/FixMyStreet/App/Controller/Tokens.pm
diff options
context:
space:
mode:
authorEdmund von der Burg <evdb@mysociety.org>2011-03-31 17:54:14 +0100
committerEdmund von der Burg <evdb@mysociety.org>2011-03-31 17:54:14 +0100
commit53fbccab8e7471fa9e06496a56f136b1edb43351 (patch)
treed55e62c6729093f4532876010b91cf04705cd535 /perllib/FixMyStreet/App/Controller/Tokens.pm
parentaee7bf19d25be738df0ca94e12452de33dcf42f9 (diff)
Ported import.cgi to catalyst
Diffstat (limited to 'perllib/FixMyStreet/App/Controller/Tokens.pm')
-rw-r--r--perllib/FixMyStreet/App/Controller/Tokens.pm17
1 files changed, 16 insertions, 1 deletions
diff --git a/perllib/FixMyStreet/App/Controller/Tokens.pm b/perllib/FixMyStreet/App/Controller/Tokens.pm
index 6feae9e9c..9a719a59d 100644
--- a/perllib/FixMyStreet/App/Controller/Tokens.pm
+++ b/perllib/FixMyStreet/App/Controller/Tokens.pm
@@ -20,7 +20,7 @@ Act on the various tokens that can be submitted.
=head2 confirm_problem
- /[Pp]/([0-9A-Za-z]{16,18}).*$
+ /P/([0-9A-Za-z]{16,18}).*$
Confirm a problem - url appears in emails sent to users after they create the
problem but are not logged in.
@@ -68,6 +68,21 @@ sub confirm_problem : Path('/P') {
return 1;
}
+=head2 redirect_to_partial_problem
+
+ /P/...
+
+Redirect user to continue filling in a partial problem.
+
+=cut
+
+sub redirect_to_partial_problem : Path('/L') {
+ my ( $self, $c, $token_code ) = @_;
+
+ my $url = $c->uri_for( "/reports/new", { partial => $token_code } );
+ return $c->res->redirect( $url );
+}
+
=head2 load_auth_token
my $auth_token =