Skip to content

armgit / ente

Public Imported from GitHub
0

πŸ’š End-to-end encrypted cloud for everything.

Remove unused Space link creation bindings

Manav Rathib0cc68adbe6f
diff --git a/rust/bindings/wasm/space/src/space.rs b/rust/bindings/wasm/space/src/space.rs
index 3df0b8518d..1fafd8c98d 100644
--- a/rust/bindings/wasm/space/src/space.rs
+++ b/rust/bindings/wasm/space/src/space.rs
@@ -153,14 +153,6 @@ pub struct CreatedSpace {
space_slug: String,
}
-#[derive(Serialize, Tsify)]
-#[serde(rename_all = "camelCase")]
-pub struct CreatedSpaceLink {
- space_id: String,
- space_slug: String,
- access_key: String,
-}
-
#[derive(Serialize, Tsify)]
#[serde(rename_all = "camelCase")]
pub struct DecryptedSpaceProfile {
@@ -984,36 +976,6 @@ pub struct SpaceAccountCtxHandle {
#[wasm_bindgen]
impl SpaceAccountCtxHandle {
- #[wasm_bindgen(js_name = getOrCreateSpaceLink)]
- pub async fn get_or_create_space_link(
- &self,
- space_id: String,
- ) -> Result<<CreatedSpaceLink as Tsify>::JsType, Error> {
- let value = self.inner.get_or_create_space_link(&space_id).await?;
- CreatedSpaceLink {
- space_id: value.space_id,
- space_slug: value.space_slug,
- access_key: value.access_key,
- }
- .into_js()
- .map_err(Into::into)
- }
-
- #[wasm_bindgen(js_name = rotateSpaceLink)]
- pub async fn rotate_space_link(
- &self,
- space_id: String,
- ) -> Result<<CreatedSpaceLink as Tsify>::JsType, Error> {
- let value = self.inner.rotate_space_link(&space_id).await?;
- CreatedSpaceLink {
- space_id: value.space_id,
- space_slug: value.space_slug,
- access_key: value.access_key,
- }
- .into_js()
- .map_err(Into::into)
- }
-
#[wasm_bindgen(js_name = createSpace)]
pub async fn create_space(
&self,
diff --git a/web/apps/space/src/services/space.ts b/web/apps/space/src/services/space.ts
index d5b9d418f6..321479310f 100644
--- a/web/apps/space/src/services/space.ts
+++ b/web/apps/space/src/services/space.ts
@@ -613,14 +613,6 @@ const withCurrentSpaceContext = async <T>(
}
};
-export const getOrCreateCurrentSpaceLink = () =>
- withCurrentSpaceContext((ctx, spaceId) =>
- ctx.getOrCreateSpaceLink(spaceId),
- );
-
-export const rotateCurrentSpaceLink = () =>
- withCurrentSpaceContext((ctx, spaceId) => ctx.rotateSpaceLink(spaceId));
-
const messageQuoteFromPostResponse = async (
ctx: SpaceAccountCtxHandle,
post: PostResponse,