refactor: refactor some crates with http_server

This commit is contained in:
appflowy
2022-02-07 14:40:45 +08:00
parent 680d130986
commit 084e9c5f6f
33 changed files with 3172 additions and 1477 deletions

View File

@ -16,7 +16,7 @@ bytes = "1.0"
flowy-collaboration = { path = "../../../shared-lib/flowy-collaboration", optional = true}
lib-ot = { path = "../../../shared-lib/lib-ot", optional = true}
serde_json = {version = "1.0", optional = true}
backend-service = { path = "../../../shared-lib/backend-service", optional = true}
http-flowy = { git = "https://github.com/AppFlowy-IO/AppFlowy-Server", optional = true}
flowy-database = { path = "../flowy-database", optional = true}
r2d2 = { version = "0.8", optional = true}
lib-sqlite = { path = "../lib-sqlite", optional = true }
@ -25,5 +25,5 @@ lib-sqlite = { path = "../lib-sqlite", optional = true }
collaboration = ["flowy-collaboration"]
ot = ["lib-ot"]
serde = ["serde_json"]
backend = ["backend-service"]
http_server = ["http-flowy"]
db = ["flowy-database", "lib-sqlite", "r2d2"]

View File

@ -1,6 +1,6 @@
use crate::FlowyError;
use backend_service::errors::{ErrorCode as ServerErrorCode, ServerError};
use error_code::ErrorCode;
use http_flowy::errors::{ErrorCode as ServerErrorCode, ServerError};
impl std::convert::From<ServerError> for FlowyError {
fn from(error: ServerError) -> Self {

View File

@ -16,10 +16,10 @@ mod serde;
pub use serde::*;
//
#[cfg(feature = "backend")]
mod backend;
#[cfg(feature = "backend")]
pub use backend::*;
#[cfg(feature = "http_server")]
mod http_server;
#[cfg(feature = "http_server")]
pub use http_server::*;
#[cfg(feature = "db")]
mod database;