api: file download: code cleanups

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2021-06-23 22:40:05 +02:00
parent 837b194224
commit d0a3db1bf5

View File

@ -519,7 +519,7 @@ __PACKAGE__->register_method({
pattern => 'https?://.*', pattern => 'https?://.*',
}, },
content => { content => {
description => "Content type.", description => "Content type.", # TODO: could be optional & detected in most cases
type => 'string', format => 'pve-storage-content', type => 'string', format => 'pve-storage-content',
enum => ['iso', 'vztmpl'], enum => ['iso', 'vztmpl'],
}, },
@ -545,7 +545,7 @@ __PACKAGE__->register_method({
type => 'boolean', type => 'boolean',
optional => 1, optional => 1,
default => 1, default => 1,
} },
}, },
}, },
returns => { returns => {
@ -607,7 +607,7 @@ __PACKAGE__->register_method({
PVE::Tools::download_file_from_url("$path/$filename", $url, $opts); PVE::Tools::download_file_from_url("$path/$filename", $url, $opts);
}; };
return $rpcenv->fork_worker('download', $filename, $user, $worker);; return $rpcenv->fork_worker('download', $filename, $user, $worker);
}}); }});
1; 1;