@ -57,8 +57,8 @@ pub async fn get_local_bootstrap(location: String, invite: JsValue) -> JsValue {
#[ cfg(target_arch = " wasm32 " ) ]
#[ cfg(target_arch = " wasm32 " ) ]
#[ wasm_bindgen ]
#[ wasm_bindgen ]
pub async fn decode_invitation ( invite : String ) -> JsValue {
pub async fn get_local_bootstrap_with_public ( location : String , invite : JsValue ) -> JsValue {
let res = decode_invitation_string ( invite ) ;
let res = retrieve_local_bootstrap ( location , invite . as_string ( ) , true ) . await ;
if res . is_some ( ) {
if res . is_some ( ) {
serde_wasm_bindgen ::to_value ( & res . unwrap ( ) ) . unwrap ( )
serde_wasm_bindgen ::to_value ( & res . unwrap ( ) ) . unwrap ( )
} else {
} else {
@ -68,8 +68,8 @@ pub async fn decode_invitation(invite: String) -> JsValue {
#[ cfg(target_arch = " wasm32 " ) ]
#[ cfg(target_arch = " wasm32 " ) ]
#[ wasm_bindgen ]
#[ wasm_bindgen ]
pub async fn get_local_url ( location : String ) -> JsValue {
pub async fn decode_invitation ( invite : String ) -> JsValue {
let res = retrieve_local_url ( location ) . await ;
let res = decode_invitation_string ( invite ) ;
if res . is_some ( ) {
if res . is_some ( ) {
serde_wasm_bindgen ::to_value ( & res . unwrap ( ) ) . unwrap ( )
serde_wasm_bindgen ::to_value ( & res . unwrap ( ) ) . unwrap ( )
} else {
} else {
@ -79,10 +79,10 @@ pub async fn get_local_url(location: String) -> JsValue {
#[ cfg(target_arch = " wasm32 " ) ]
#[ cfg(target_arch = " wasm32 " ) ]
#[ wasm_bindgen ]
#[ wasm_bindgen ]
pub async fn get_ngone_url_of_invitation ( invitation_string : String ) -> JsValue {
pub async fn get_local_url ( location : String ) -> JsValue {
let res = decode_invitation_string ( invitation_string ) ;
let res = retrieve_local_url ( location ) . await ;
if res . is_some ( ) {
if res . is_some ( ) {
serde_wasm_bindgen ::to_value ( & res . unwrap ( ) . get_urls ( ) [ 0 ] ) . unwrap ( )
serde_wasm_bindgen ::to_value ( & res . unwrap ( ) ) . unwrap ( )
} else {
} else {
JsValue ::FALSE
JsValue ::FALSE
}
}
@ -90,10 +90,10 @@ pub async fn get_ngone_url_of_invitation(invitation_string: String) -> JsValue {
#[ cfg(target_arch = " wasm32 " ) ]
#[ cfg(target_arch = " wasm32 " ) ]
#[ wasm_bindgen ]
#[ wasm_bindgen ]
pub async fn get_local_bootstrap_with_public ( location : String , invite : JsValue ) -> JsValue {
pub async fn get_ngone_url_of_invitation ( invitation_string : String ) -> JsValue {
let res = retrieve_local_bootstrap ( location , invite . as_string ( ) , true ) . await ;
let res = decode_invitation_string ( invitation_string ) ;
if res . is_some ( ) {
if res . is_some ( ) {
serde_wasm_bindgen ::to_value ( & res . unwrap ( ) ) . unwrap ( )
serde_wasm_bindgen ::to_value ( & res . unwrap ( ) . get_urls ( ) [ 0 ] ) . unwrap ( )
} else {
} else {
JsValue ::FALSE
JsValue ::FALSE
}
}