Browse Source

+ connect ldap module to app

master
Alex 'AdUser' Z 10 years ago
parent
commit
5795d9fc6b
  1. 7
      lib/LDV.pm

7
lib/LDV.pm

@ -30,12 +30,19 @@ 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');
$zb->get ('/') -> to(action => 'create');
$zb->route('/:time', time => qr/\d+/)
->via('GET') -> to(action => 'view');
my $root = $self->app->config->{zerobin}->{root};
mkdir $self->app->home->rel_dir($root);
}

Loading…
Cancel
Save