diff --git a/lib/PostText.pm b/lib/PostText.pm index 18f85ca..bcd3fb7 100644 --- a/lib/PostText.pm +++ b/lib/PostText.pm @@ -75,11 +75,6 @@ sub startup($self) { $self->remark->per_page($remarks_per_page) } - if (my $date_format = $self->config->{'date_format'}) { - $self->thread->date_format($date_format); - $self->remark->date_format($date_format); - } - $self->asset->process('main.css', 'css/PostText.css'); push @{$self->commands->namespaces}, 'PostText::Command'; @@ -120,6 +115,8 @@ sub startup($self) { ->to('thread#flag') ->name('flag_thread'); + #$thread->get('feed', [format => ['rss']])->to('thread#feed'); + # Remark my $remark = $r->any('/remark'); diff --git a/lib/PostText/Controller/Thread.pm b/lib/PostText/Controller/Thread.pm index 0ad108c..68c88e7 100644 --- a/lib/PostText/Controller/Thread.pm +++ b/lib/PostText/Controller/Thread.pm @@ -1,6 +1,7 @@ package PostText::Controller::Thread; use Mojo::Base 'Mojolicious::Controller', -signatures; +#use XML::RSS; sub create($self) { my $v; @@ -90,6 +91,17 @@ sub by_page($self) { $self->render; } +#sub feed($self) { +# my $threads = $self->thread->by_page(1); +# my $rss = XML::RSS->new(version => '2.0'); +# +# $rss->channel( +# title => 'Post::Text', +# description => 'In UTF-8 we trust. 🫡', +# link => $self->url_for('thread_list')->to_abs, +# ); +#} + sub bump($self) { my $thread_id = $self->param('thread_id');