Make less ugly

This commit is contained in:
swag 2022-12-08 15:11:49 -06:00
parent 1cf929eb78
commit 0b79b0a977

View File

@ -4,14 +4,16 @@ use Mojo::Base 'Mojolicious::Controller', -signatures;
sub flagged($self) {
my $flagged_posts = $self->moderator->flagged;
my $post_links = [map {
if ($_->{'type'} eq 'thread') {
$self->url_for(single_thread => thread_id => $_->{'id'})
}
else {
$self->url_for(single_remark => remark_id => $_->{'id'})
}
} @{$flagged_posts}];
my $post_links = [
map {
if ($_->{'type'} eq 'thread') {
$self->url_for(single_thread => thread_id => $_->{'id'})
}
else {
$self->url_for(single_remark => remark_id => $_->{'id'})
}
} @{$flagged_posts}
];
$self->stash(post_links => $post_links);