From dd61b262f2e9d2ab4803e6452f311c85ab082109 Mon Sep 17 00:00:00 2001 From: Andreas Coroiu Date: Wed, 6 Nov 2024 15:01:33 +0100 Subject: [PATCH] feat: add example methods --- crates/bitwarden-wasm-internal/src/client.rs | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/crates/bitwarden-wasm-internal/src/client.rs b/crates/bitwarden-wasm-internal/src/client.rs index a824b427..62ea28fe 100644 --- a/crates/bitwarden-wasm-internal/src/client.rs +++ b/crates/bitwarden-wasm-internal/src/client.rs @@ -53,8 +53,18 @@ impl BitwardenClient { env!("SDK_VERSION").to_owned() } - pub fn throw(&self, msg: String) -> Result<(), crate::error::GenericError> { - Err(crate::error::GenericError(msg)) + pub fn echo_complex( + &self, + args: bitwarden_core::mobile::crypto::InitUserCryptoRequest, + ) -> Result { + Ok(args.email) + } + + pub async fn echo_complex_async( + &self, + args: bitwarden_core::mobile::crypto::InitUserCryptoRequest, + ) -> Result { + Ok(args.email) } /// Test method, calls http endpoint