this is my true hell

This commit is contained in:
Matthew Connelly 2015-11-14 06:52:53 +00:00
parent 5bdbd4f10b
commit dbff8b3d72
1 changed files with 3 additions and 3 deletions

View File

@ -77,9 +77,9 @@ hook 'before' => sub { CheckExpiry(); };
# Routes
#get
get '/' => sub { template 'index.tt'; };
get '/:id' => sub { my $paste=GetPaste(scalar params 'route') or pass; template 'show.tt', { paste => $paste }; };
get '/:id/copy' => sub { my $paste=GetPaste(scalar params 'route') or pass; template 'index.tt', { paste => $paste }; };
get '/:id/raw' => sub { my $paste=GetPaste(scalar params 'route') or pass; content_type 'text/plain'; return $paste->code; };
get '/:id' => sub { my $paste=GetPaste(scalar params('route')) or pass; template 'show.tt', { paste => $paste }; };
get '/:id/copy' => sub { my $paste=GetPaste(scalar params('route')) or pass; template 'index.tt', { paste => $paste }; };
get '/:id/raw' => sub { my $paste=GetPaste(scalar params('route')) or pass; content_type 'text/plain'; return $paste->code; };
#post
post '/' => sub {
my $p = params 'body';