]> git.proxmox.com Git - proxmox-backup.git/commitdiff
api: Fix schema return annotation of tfa_update_auth
authorMaximiliano Sandoval <m.sandoval@proxmox.com>
Tue, 20 Jun 2023 13:39:07 +0000 (15:39 +0200)
committerWolfgang Bumiller <w.bumiller@proxmox.com>
Fri, 23 Jun 2023 05:52:56 +0000 (07:52 +0200)
In the next commit we expose a command to list the tfa methods of a
user. Without this annotation one would get the following error

    unable to format result: got unexpected data (expected null).

when running the proposed cli command.

Signed-off-by: Maximiliano Sandoval <m.sandoval@proxmox.com>
src/api2/access/tfa.rs

index 4b27c0db46782e899ee97548d168fc19fa3a228a..89d7e353c258f96ae18bd3c78f2f1508babf3b31 100644 (file)
@@ -56,6 +56,11 @@ async fn tfa_update_auth(
     input: {
         properties: { userid: { type: Userid } },
     },
+    returns: {
+        description: "The list of TFA entries.",
+        type: Array,
+        items: { type: methods::TypedTfaInfo }
+    },
     access: {
         permission: &Permission::Or(&[
             &Permission::Privilege(&["access", "users"], PRIV_PERMISSIONS_MODIFY, false),