mirror of
https://github.com/AppFlowy-IO/AppFlowy.git
synced 2024-08-30 18:12:39 +00:00
chore: remove unused features (#5196)
* chore: remove unused features * chore: update logs
This commit is contained in:
@ -7,7 +7,7 @@ edition = "2018"
|
||||
|
||||
[dependencies]
|
||||
flowy-derive.workspace = true
|
||||
flowy-sqlite = { workspace = true, optional = true }
|
||||
flowy-sqlite = { workspace = true }
|
||||
flowy-encrypt = { workspace = true }
|
||||
flowy-error = { workspace = true, features = ["impl_from_dispatch_error", "impl_from_sqlite", "impl_from_collab_folder", "impl_from_collab_persistence"] }
|
||||
flowy-folder-pub = { workspace = true }
|
||||
@ -57,8 +57,6 @@ rand_core = "0.6.2"
|
||||
quickcheck_macros = "1.0"
|
||||
|
||||
[features]
|
||||
default = ["rev-sqlite"]
|
||||
rev-sqlite = ["flowy-sqlite"]
|
||||
dart = ["flowy-codegen/dart", "flowy-notification/dart"]
|
||||
tauri_ts = ["flowy-codegen/ts", "flowy-notification/tauri_ts"]
|
||||
|
||||
|
@ -133,6 +133,7 @@ impl UserManager {
|
||||
|
||||
if let Ok(session) = self.get_session() {
|
||||
let user = self.get_user_profile_from_disk(session.user_id).await?;
|
||||
|
||||
// Get the current authenticator from the environment variable
|
||||
let current_authenticator = current_authenticator();
|
||||
|
||||
@ -151,9 +152,10 @@ impl UserManager {
|
||||
|
||||
event!(
|
||||
tracing::Level::INFO,
|
||||
"init user session: {}:{}",
|
||||
"init user session: {}:{}, authenticator: {:?}",
|
||||
user.uid,
|
||||
user.email
|
||||
user.email,
|
||||
user.authenticator,
|
||||
);
|
||||
|
||||
self.prepare_user(&session).await;
|
||||
|
@ -159,6 +159,7 @@ impl UserManager {
|
||||
Ok(())
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip(self), err)]
|
||||
pub async fn add_workspace(&self, workspace_name: &str) -> FlowyResult<UserWorkspace> {
|
||||
let new_workspace = self
|
||||
.cloud_services
|
||||
@ -166,6 +167,11 @@ impl UserManager {
|
||||
.create_workspace(workspace_name)
|
||||
.await?;
|
||||
|
||||
info!(
|
||||
"new workspace: {}, name:{}",
|
||||
new_workspace.id, new_workspace.name
|
||||
);
|
||||
|
||||
// save the workspace to sqlite db
|
||||
let uid = self.user_id()?;
|
||||
let mut conn = self.db_connection(uid)?;
|
||||
@ -208,7 +214,9 @@ impl UserManager {
|
||||
save_user_workspaces(uid, conn, &[user_workspace])
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip(self), err)]
|
||||
pub async fn leave_workspace(&self, workspace_id: &str) -> FlowyResult<()> {
|
||||
info!("leave workspace: {}", workspace_id);
|
||||
self
|
||||
.cloud_services
|
||||
.get_user_service()?
|
||||
@ -221,7 +229,9 @@ impl UserManager {
|
||||
delete_user_workspaces(conn, workspace_id)
|
||||
}
|
||||
|
||||
#[instrument(level = "info", skip(self), err)]
|
||||
pub async fn delete_workspace(&self, workspace_id: &str) -> FlowyResult<()> {
|
||||
info!("delete workspace: {}", workspace_id);
|
||||
self
|
||||
.cloud_services
|
||||
.get_user_service()?
|
||||
|
Reference in New Issue
Block a user