|= []}, $val;
});
$app->helper(shipped => sub {
# special stash slot for sending json-able structs to js;
# get/set logic here cloned from Mojo::Util::_stash.
my $c =
edit del nuke navigate/);
my @crud_posts = (qw/save/);
my $fmts = [format=>[qw/html json/]];
for ($r->under('tables') ->to('auth#ok' )) {
for ($_-
Mojolicious::Controller';
# 'shipped' is a special stash slot for passing serialisable things to json or templates.
# Other stash slots can be complex objects for use by templates.
sub ok {
my $
$error = "tables activity unauthorised";
$c->fail($error) if (($c->stash('format')||'x') eq 'json');
$c->add_flash(errors=>$error);
$c->redirect_to('/');
return;
}
# more fine-graine
data => \@data,
};
if (($c->stash('format')||'data') eq 'json') {
$c->render( json => $bundle );
return;
}
$c->render(data => $c->dumper($bundle));
}
->stash(user_id=>'administrator');
return 1
}
if (($c->stash('format')||'x') eq 'json') {
$c->fail;
return;
}
$c->add_flash(errors => 'Please sign in first us