]> git.proxmox.com Git - pve-common.git/blobdiff - src/PVE/RESTHandler.pm
API schema: add 'allowtoken' property
[pve-common.git] / src / PVE / RESTHandler.pm
index 5e8278e9a016c2f447443e535995125c0c381f35..299bf6893d1cf4a2e5cd90ca0d8a4d83f2936903 100644 (file)
@@ -242,6 +242,9 @@ sub register_method {
        $errprefix = "register method ${self}/$info->{path} -";
        $info->{method} = 'GET' if !$info->{method};
        $method = $info->{method};
+
+       # apply default value
+       $info->{allowtoken} = 1 if !defined($info->{allowtoken});
     }
 
     $method_path_lookup->{$self} = {} if !defined($method_path_lookup->{$self});