diff --git a/libs/client-api/src/http_billing.rs b/libs/client-api/src/http_billing.rs index 5cfd2e5a..cefa53f9 100644 --- a/libs/client-api/src/http_billing.rs +++ b/libs/client-api/src/http_billing.rs @@ -1,7 +1,7 @@ use crate::Client; use client_api_entity::billing_dto::{ SetSubscriptionRecurringInterval, SubscriptionCancelRequest, SubscriptionLinkRequest, - SubscriptionPlanDetail, SubscriptionTrialRequest, WorkspaceUsageAndLimit, + SubscriptionPlanDetail, WorkspaceUsageAndLimit, }; use reqwest::Method; use shared_entity::{ @@ -222,24 +222,4 @@ impl Client { .await? .into_data() } - - /// request a free trial for plan - pub async fn post_subscription_free_trial( - &self, - workspace_id: &str, - plan: SubscriptionPlan, - ) -> Result<(), AppResponseError> { - let url = format!( - "{}/billing/api/v1/subscription-trial/{}", - self.base_billing_url(), - workspace_id - ); - let resp = self - .cloud_client - .post(&url) - .query(&SubscriptionTrialRequest { plan }) - .send() - .await?; - AppResponse::<()>::from_response(resp).await?.into_error() - } } diff --git a/libs/shared-entity/src/dto/billing_dto.rs b/libs/shared-entity/src/dto/billing_dto.rs index fd180e68..ef36ccfc 100644 --- a/libs/shared-entity/src/dto/billing_dto.rs +++ b/libs/shared-entity/src/dto/billing_dto.rs @@ -163,4 +163,7 @@ pub struct SubscriptionLinkRequest { #[derive(Serialize, Deserialize, Debug)] pub struct SubscriptionTrialRequest { pub plan: SubscriptionPlan, + #[serde(default)] + #[serde(skip_serializing_if = "Option::is_none")] + pub period_days: Option, } diff --git a/services/appflowy-worker/src/import_worker/worker.rs b/services/appflowy-worker/src/import_worker/worker.rs index c8b3d79f..c8e6d859 100644 --- a/services/appflowy-worker/src/import_worker/worker.rs +++ b/services/appflowy-worker/src/import_worker/worker.rs @@ -50,6 +50,7 @@ use std::collections::{HashMap, HashSet}; use std::env::temp_dir; use std::fmt::Display; use std::fs::Permissions; +use std::io::ErrorKind; use std::ops::DerefMut; use std::os::unix::fs::PermissionsExt; use std::path::{Path, PathBuf}; @@ -596,7 +597,11 @@ async fn process_task( "[Import]: {} deleted unzip file: {:?}", task.workspace_id, unzip_dir_path ), - Err(err) => error!("Failed to delete unzip file: {:?}", err), + Err(err) => { + if err.kind() != ErrorKind::NotFound { + error!("Failed to delete unzip file: {:?}", err); + } + }, } }); },