- or download this
my $onlyLoggedIn = $r->under('/admin' => \&loggedIn);
$onlyLoggedIn->post('uploadFile')->to('files#insert');
...
$self->render(data => '',status => $responseCode);
}
- or download this
$self->helper( onlyauth => sub {
my ($c,$block) = @_;
...
return $block->() if $block;
}
});
- or download this
%= onlyauth begin
%= include 'adminbar'
% end