feat: custom server url in application (#3996)

* chore:test

* chore: update ui

* feat: set appflowy cloud url

* chore: add self host docs

* fix: save user

* fix: sign out when authenticator not match

* fix: sign out when authenticator not match

* fix: db lock

* chore: remove unuse env file

* test: disable supabase cloud test

* test: disable supabase cloud test

* chore: fix save
This commit is contained in:
Nathan.fooo
2023-11-24 11:54:47 +08:00
committed by GitHub
parent e18e031710
commit 1fad713477
63 changed files with 1758 additions and 721 deletions

View File

@ -27,6 +27,7 @@ r2d2 = { version = "0.8", optional = true }
url = { version = "2.2", optional = true }
collab-database = { version = "0.1.0", optional = true }
collab-document = { version = "0.1.0", optional = true }
collab-persistence = { version = "0.1.0", optional = true }
tokio-postgres = { version = "0.7.8", optional = true }
client-api = { version = "0.1.0", optional = true }
@ -36,7 +37,7 @@ impl_from_dispatch_error = ["lib-dispatch"]
impl_from_serde = []
impl_from_reqwest = ["reqwest"]
impl_from_sqlite = ["flowy-sqlite", "r2d2"]
impl_from_collab = ["collab-database", "collab-document", "impl_from_reqwest"]
impl_from_collab = ["collab-database", "collab-document", "impl_from_reqwest", "collab-persistence"]
impl_from_postgres = ["tokio-postgres"]
impl_from_url = ["url"]
impl_from_appflowy_cloud = ["client-api"]

View File

@ -1,8 +1,18 @@
use collab_database::error::DatabaseError;
use collab_document::error::DocumentError;
use collab_persistence::PersistenceError;
use crate::FlowyError;
use crate::{ErrorCode, FlowyError};
impl From<PersistenceError> for FlowyError {
fn from(err: PersistenceError) -> Self {
match err {
PersistenceError::RocksdbCorruption(_) => FlowyError::new(ErrorCode::RocksdbCorruption, err),
PersistenceError::RocksdbIOError(_) => FlowyError::new(ErrorCode::RocksdbIOError, err),
_ => FlowyError::new(ErrorCode::RocksdbInternal, err),
}
}
}
impl From<DatabaseError> for FlowyError {
fn from(error: DatabaseError) -> Self {
FlowyError::internal().with_context(error)