Browse Source

* zerobin : expand controller

master
Alex "AdUser" Z 10 years ago
parent
commit
0e21b62a85
  1. 31
      lib/LDV/Zerobin.pm

31
lib/LDV/Zerobin.pm

@ -6,7 +6,36 @@ use utf8;
use Mojo::Base 'Mojolicious::Controller'; use Mojo::Base 'Mojolicious::Controller';
sub view { my ($self) = @_; $self->render(); }
sub create { my ($self) = @_; $self->render(); } sub create { my ($self) = @_; $self->render(); }
sub view
{
my ($self) = @_;
$self->render();
}
sub save
{
my ($self) = @_;
my $id = $self->stash('id');
eval {
die("not implemented\n");
$self->redirect_to("/zerobin2/$id");
1;
} or do {
$self->stash({'result' => $@});
$self->redirect_to("/zerobin2/$id");
};
$self->rendered();
return 1;
}
sub prune
{
$self->stash({'result' => $@});
}
1; 1;

Loading…
Cancel
Save