From 5f030d5e6b7f15fa4358590bc576d984e71d4d9d Mon Sep 17 00:00:00 2001 From: swag Date: Mon, 24 Apr 2023 13:26:29 -0400 Subject: [PATCH] Make date format static for now --- lib/PostText.pm | 7 ++----- lib/PostText/Controller/Thread.pm | 12 ++++++++++++ 2 files changed, 14 insertions(+), 5 deletions(-) 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');