Browse Source

* LDV : reorder code

master
Alex 'AdUser' Z 10 years ago
parent
commit
5351095805
  1. 12
      lib/LDV.pm

12
lib/LDV.pm

@ -16,6 +16,12 @@ sub startup {
$self->app->mode('production');
$self->app->secret($self->app->config->{secret});
$self->app->attr(ldap => sub {
require LDV::LDAP;
my $ldap = LDV::LDAP->new($self->app->config->{ldap});
return $ldap;
});
my $r = $self->routes;
# /user
@ -30,12 +36,6 @@ sub startup {
$user->post('/create') ->to(action => 'create');
$user->post('/update') ->to(action => 'update');
$self->app->attr(ldap => sub {
require LDV::LDAP;
my $ldap = LDV::LDAP->new($self->app->config->{ldap});
return $ldap;
});
# /zerobin
my $zb = $r->route('/zerobin2') -> to(controller => 'zerobin');
$zb->post('/') -> to(action => 'save');

Loading…
Cancel
Save