chore: rename crates

This commit is contained in:
appflowy
2022-03-19 16:52:28 +08:00
parent b1d87d95cf
commit 6a3820253f
166 changed files with 554 additions and 772 deletions

View File

@ -13,7 +13,7 @@ protobuf = {version = "2.20.0"}
bytes = "1.0"
flowy-collaboration = { path = "../../../shared-lib/flowy-collaboration", optional = true}
flowy-sync = { path = "../../../shared-lib/flowy-sync", optional = true}
lib-ot = { path = "../../../shared-lib/lib-ot", optional = true}
serde_json = {version = "1.0", optional = true}
http-flowy = { git = "https://github.com/AppFlowy-IO/AppFlowy-Server", optional = true}
@ -22,7 +22,7 @@ r2d2 = { version = "0.8", optional = true}
lib-sqlite = { path = "../lib-sqlite", optional = true }
[features]
collaboration = ["flowy-collaboration"]
collaboration = ["flowy-sync"]
ot = ["lib-ot"]
serde = ["serde_json"]
http_server = ["http-flowy"]

View File

@ -1,9 +1,9 @@
use crate::FlowyError;
use flowy_collaboration::errors::ErrorCode;
use flowy_sync::errors::ErrorCode;
impl std::convert::From<flowy_collaboration::errors::CollaborateError> for FlowyError {
fn from(error: flowy_collaboration::errors::CollaborateError) -> Self {
impl std::convert::From<flowy_sync::errors::CollaborateError> for FlowyError {
fn from(error: flowy_sync::errors::CollaborateError) -> Self {
match error.code {
ErrorCode::RecordNotFound => FlowyError::record_not_found().context(error.msg),
_ => FlowyError::internal().context(error.msg),