diff --git a/lib/BurguillosInfo.pm b/lib/BurguillosInfo.pm index 1258352..2f04c93 100644 --- a/lib/BurguillosInfo.pm +++ b/lib/BurguillosInfo.pm @@ -30,6 +30,7 @@ sub startup ($self) { $r->get('/')->to('Page#index'); $r->get('/sitemap.xml')->to('Sitemap#sitemap'); $r->get('/robots.txt')->to('Robots#robots'); + $r->get('/aprende-a-dibujar-con-krita')->to('Page#rickroll'); # $r->get('/:post')->to('Page#post'); $r->get('/stats')->to('Metrics#stats'); diff --git a/lib/BurguillosInfo/Controller/Page.pm b/lib/BurguillosInfo/Controller/Page.pm index c1918a7..f3584cf 100644 --- a/lib/BurguillosInfo/Controller/Page.pm +++ b/lib/BurguillosInfo/Controller/Page.pm @@ -10,7 +10,7 @@ use BurguillosInfo::Posts; use Data::Dumper; -use Mojo::Base 'Mojolicious::Controller'; +use Mojo::Base 'Mojolicious::Controller', '-signatures'; use DateTime::Format::ISO8601; use DateTime::Format::Mail; @@ -27,6 +27,11 @@ sub index { ); } +sub rickroll($self) { + $self->res->headers->location('https://www.youtube.com/watch?v=dQw4w9WgXcQ'); + $self->render(text => '', status => 302); +} + sub category_rss { my $self = shift; my $categories = BurguillosInfo::Categories->new->Retrieve;