Make less ugly
This commit is contained in:
parent
1cf929eb78
commit
0b79b0a977
|
@ -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);
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user