mirror of
https://git.proxmox.com/git/pve-manager
synced 2025-08-09 14:37:56 +00:00
api: cluster/backupinfo: rework bogus index endpoint
This had a myriad of issues: * marked as protected, thus forwarded to the privileged daemon even if it just returned static information * did not return directory index but a "stub" string, which does not makes sense. * not named index Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
02c634bcdc
commit
db11051374
@ -32,21 +32,32 @@ sub get_included_vmids {
|
|||||||
}
|
}
|
||||||
|
|
||||||
__PACKAGE__->register_method({
|
__PACKAGE__->register_method({
|
||||||
name => 'get_backupinfo',
|
name => 'index',
|
||||||
path => '',
|
path => '',
|
||||||
method => 'GET',
|
method => 'GET',
|
||||||
protected => 1,
|
description => "Index for backup info related endpoints",
|
||||||
description => "Stub, waits for future use.",
|
|
||||||
parameters => {
|
parameters => {
|
||||||
additionalProperties => 0,
|
additionalProperties => 0,
|
||||||
properties => {},
|
properties => {},
|
||||||
},
|
},
|
||||||
returns => {
|
returns => {
|
||||||
type => 'string',
|
type => 'array',
|
||||||
description => 'Shows stub message',
|
description => 'Directory index.',
|
||||||
|
items => {
|
||||||
|
type => "object",
|
||||||
|
properties => {
|
||||||
|
subdir => {
|
||||||
|
type => 'string',
|
||||||
|
description => 'API sub-directory endpoint',
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
links => [ { rel => 'child', href => "{subdir}" } ],
|
||||||
},
|
},
|
||||||
code => sub {
|
code => sub {
|
||||||
return "Stub endpoint. There is nothing here yet.";
|
return [
|
||||||
|
{ subdir => 'not_backed_up' },
|
||||||
|
];
|
||||||
}});
|
}});
|
||||||
|
|
||||||
__PACKAGE__->register_method({
|
__PACKAGE__->register_method({
|
||||||
|
Loading…
Reference in New Issue
Block a user