Adding rickroll.

This commit is contained in:
sergiotarxz 2023-05-12 18:32:19 +02:00
parent 4338131062
commit a5fae9996f
2 changed files with 7 additions and 1 deletions

View File

@ -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');

View File

@ -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;