Commit 789aa82d authored by Yadd's avatar Yadd
Browse files

Add reload method (closes: #1099)

parent f243e2d9
......@@ -76,7 +76,9 @@ sub _run {
}
sub status {
my $self = shift;
my ( $class, $args ) = @_;
$args //= {};
my $self = $class->new($args);
# Check if main handler initialization has been done
unless ( %$self->api->tsv ) {
......@@ -90,6 +92,23 @@ sub status {
};
}
sub reload {
my ( $class, $args ) = @_;
$args //= {};
my $self = $class->new($args);
# Check if main handler initialization has been done
unless ( %$self->api->tsv ) {
eval { $self->api->checkConf() };
$self->lmLog( $@, 'error' ) if ($@);
}
return sub {
my $req = Lemonldap::NG::Common::PSGI::Request->new( $_[0] );
$self->api->reload($req);
return [ 200, [ @{ $req->{respHeaders} } ], [ $req->{respBody} ] ];
};
}
## @method private PSGI-Response _authAndTrace($req)
# Launch $self->api::run() and then handler() if
# response is 200.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment