[pve-devel] [PATCH manager] add 'default' as default name
Dominik Csapak
d.csapak at proxmox.com
Wed May 30 10:52:19 CEST 2018
else we get a perl error that $account_name is not defined, if we don't
give a name (which is allowed and the documented default name is 'default')
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
PVE/API2/ACMEAccount.pm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/PVE/API2/ACMEAccount.pm b/PVE/API2/ACMEAccount.pm
index 31c157d9..5e06024f 100644
--- a/PVE/API2/ACMEAccount.pm
+++ b/PVE/API2/ACMEAccount.pm
@@ -157,7 +157,7 @@ __PACKAGE__->register_method ({
my $update_account = sub {
my ($param, $msg, %info) = @_;
- my $account_name = extract_param($param, 'name');
+ my $account_name = extract_param($param, 'name') // 'default';
my $account_file = "${acme_account_dir}/${account_name}";
raise_param_exc({'name' => "ACME account config file '${account_name}' does not exist."})
@@ -265,7 +265,7 @@ __PACKAGE__->register_method ({
code => sub {
my ($param) = @_;
- my $account_name = extract_param($param, 'name');
+ my $account_name = extract_param($param, 'name') // 'default';
my $account_file = "${acme_account_dir}/${account_name}";
raise_param_exc({'name' => "ACME account config file '${account_name}' does not exist."})
--
2.11.0
More information about the pve-devel
mailing list