diff --git a/pve-rs/src/tfa.rs b/pve-rs/src/tfa.rs index 6f028a5..2b61344 100644 --- a/pve-rs/src/tfa.rs +++ b/pve-rs/src/tfa.rs @@ -487,9 +487,11 @@ mod export { } #[export] - fn api_unlock_tfa(#[try_from_ref] this: &Tfa, userid: &str) -> Result { - Ok(methods::unlock_tfa( + fn api_unlock_tfa(#[raw] raw_this: Value, userid: &str) -> Result { + let this: &Tfa = (&raw_this).try_into()?; + Ok(methods::unlock_and_reset_tfa( &mut this.inner.lock().unwrap(), + &UserAccess::new(&raw_this)?, userid, )?) }