CLI: make -cfgNum work with "save" command (#2103)
This commit is contained in:
parent
53d7923cd4
commit
2c11111547
|
@ -82,6 +82,7 @@ Update local configuration cache
|
|||
Save configuration
|
||||
|
||||
$ lemonldap-ng-cli save >conf.json
|
||||
$ lemonldap-ng-cli -cfgNum 19 save >conf-19.json
|
||||
|
||||
Restore configuration
|
||||
|
||||
|
|
|
@ -200,7 +200,7 @@ sub lastCfg {
|
|||
|
||||
sub save {
|
||||
my ($self) = @_;
|
||||
my $conf = $self->jsonResponse( '/confs/latest', 'full=1' );
|
||||
my $conf = $self->jsonResponse( '/confs/' . $self->cfgNum, 'full=1' );
|
||||
my $json = JSON->new->indent->canonical;
|
||||
print $json->encode($conf);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user