]> git.proxmox.com Git - pve-manager.git/commitdiff
cleanup: api/subscription: keep variable declarations closer to use
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 31 Jan 2019 09:54:50 +0000 (10:54 +0100)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 31 Jan 2019 09:54:50 +0000 (10:54 +0100)
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
PVE/API2/Subscription.pm

index ef9499ab9330ecac68e2476b1770f79aa9ac4108..85cfc4be1bf654f9772a97a305fff1178b99b57b 100644 (file)
@@ -104,14 +104,15 @@ __PACKAGE__->register_method ({
     code => sub {
        my ($param) = @_;
 
-       my $server_id = PVE::API2Tools::get_hwaddress();
-       my $url = "http://www.proxmox.com/products/proxmox-ve/subscription-service-plans";
        my $node = $param->{node};
 
        my $rpcenv = PVE::RPCEnvironment::get();
        my $authuser = $rpcenv->get_user();
        my $has_permission = PVE::AccessControl::check_permissions($authuser, "/nodes/$node", 'Sys.Audit');
 
+       my $server_id = PVE::API2Tools::get_hwaddress();
+       my $url = "http://www.proxmox.com/products/proxmox-ve/subscription-service-plans";
+
        my $info = PVE::INotify::read_file('subscription');
        if (!$info) {
            my $no_subscription_info = {