[pbs-devel] [PATCH v2 manager 1/2] api: Fix schema return annotation of tfa_update_auth
Maximiliano Sandoval
m.sandoval at proxmox.com
Tue Jun 20 15:39:07 CEST 2023
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 at proxmox.com>
---
src/api2/access/tfa.rs | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/api2/access/tfa.rs b/src/api2/access/tfa.rs
index 4b27c0db..89d7e353 100644
--- a/src/api2/access/tfa.rs
+++ b/src/api2/access/tfa.rs
@@ -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),
--
2.39.2
More information about the pbs-devel
mailing list