Implement new CAPTCHA behavior

This commit is contained in:
swagg boi 2023-11-10 13:12:25 -05:00
parent a41866065e
commit 40c23cc9b4

View file

@ -165,10 +165,6 @@ sub startup($self) {
->to('thread#by_page') ->to('thread#by_page')
->name('threads_list'); ->name('threads_list');
$thread->any([qw{GET POST}], '/post')
->to('thread#create')
->name('post_thread');
$thread->any('/single/:thread_id', [thread_id => qr/\d+/]) $thread->any('/single/:thread_id', [thread_id => qr/\d+/])
->any('/:thread_page', [thread_page => qr/\d+/], {thread_page => 0}) ->any('/:thread_page', [thread_page => qr/\d+/], {thread_page => 0})
->get('/', [format => [qw{html txt}]], {format => undef}) ->get('/', [format => [qw{html txt}]], {format => undef})
@ -187,27 +183,32 @@ sub startup($self) {
->to('thread#flag') ->to('thread#flag')
->name('flag_thread'); ->name('flag_thread');
$human_thread->any([qw{GET POST}], '/post')
->to('thread#create')
->name('post_thread');
# Remark # Remark
my $remark = $r ->any('/remark'); my $remark = $r ->any('/remark');
my $human_remark = $human->any('/remark'); my $human_remark = $human->any('/remark');
$remark->any([qw{GET POST}], '/post/:thread_id', [thread_id => qr/\d+/])
->any('/:remark_id', [remark_id => qr/\d+/], {remark_id => 0})
->to('remark#create')
->name('post_remark');
$remark->any('/single/:remark_id', [remark_id => qr/\d+/]) $remark->any('/single/:remark_id', [remark_id => qr/\d+/])
->get('/', [format => [qw{html txt}]], {format => undef}) ->get('/', [format => [qw{html txt}]], {format => undef})
->to('remark#by_id') ->to('remark#by_id')
->name('single_remark'); ->name('single_remark');
$remark->get('feed', [format => [qw{rss xml}]])
->to('remark#feed')
->name('remarks_feed');
$human_remark->get('/flag/:remark_id', [remark_id => qr/\d+/]) $human_remark->get('/flag/:remark_id', [remark_id => qr/\d+/])
->to('remark#flag') ->to('remark#flag')
->name('flag_remark'); ->name('flag_remark');
$remark->get('feed', [format => [qw{rss xml}]]) $human_remark
->to('remark#feed') ->any([qw{GET POST}], '/post/:thread_id', [thread_id => qr/\d+/])
->name('remarks_feed'); ->any('/:remark_id', [remark_id => qr/\d+/], {remark_id => 0})
->to('remark#create')
->name('post_remark');
# Login/out # Login/out
$r->any([qw{GET POST}], '/login') $r->any([qw{GET POST}], '/login')