diff --git a/Cargo.lock b/Cargo.lock index 4cce153db..9bd77d940 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -3014,27 +3014,12 @@ dependencies = [ name = "kitsune-core" version = "0.0.1-pre.4" dependencies = [ - "athena", - "deadpool-redis", - "eyre", "futures-util", - "kitsune-cache", - "kitsune-captcha", - "kitsune-config", "kitsune-db", - "kitsune-email", - "kitsune-embed", "kitsune-messaging", - "kitsune-search", - "kitsune-storage", - "rusty-s3", "serde", "speedy-uuid", - "thiserror", - "time", - "tracing", "typed-builder", - "url", ] [[package]] diff --git a/crates/kitsune-core/Cargo.toml b/crates/kitsune-core/Cargo.toml index b1d1c097a..f9d56c9e8 100644 --- a/crates/kitsune-core/Cargo.toml +++ b/crates/kitsune-core/Cargo.toml @@ -4,29 +4,13 @@ edition.workspace = true version.workspace = true [dependencies] -athena = { path = "../../lib/athena" } -deadpool-redis = "0.13.0" -eyre = "0.6.9" futures-util = "0.3.29" -kitsune-cache = { path = "../kitsune-cache" } -kitsune-captcha = { path = "../kitsune-captcha" } -kitsune-config = { path = "../kitsune-config" } kitsune-db = { path = "../kitsune-db" } -kitsune-email = { path = "../kitsune-email" } -kitsune-embed = { path = "../kitsune-embed" } kitsune-messaging = { path = "../kitsune-messaging" } -kitsune-search = { path = "../kitsune-search" } -kitsune-storage = { path = "../kitsune-storage" } -rusty-s3 = { version = "0.5.0", default-features = false } serde = { version = "1.0.193", features = ["derive"] } speedy-uuid = { path = "../../lib/speedy-uuid", features = ["diesel"] } -thiserror = "1.0.50" -time = "0.3.30" -tracing = "0.1.40" typed-builder = "0.18.0" -url = "2.5.0" [features] default = [] mastodon-api = [] -meilisearch = ["kitsune-search/meilisearch"] diff --git a/crates/kitsune-core/src/error.rs b/crates/kitsune-core/src/error.rs index 0dffd272d..9536c4785 100644 --- a/crates/kitsune-core/src/error.rs +++ b/crates/kitsune-core/src/error.rs @@ -1,38 +1,3 @@ use std::error::Error as StdError; -use thiserror::Error; pub type BoxError = Box; -//pub type Result = std::result::Result; - -#[derive(Debug, Error)] -pub enum ApiError { - #[error("Bad request")] - BadRequest, - - #[error("Email already taken")] - EmailTaken, - - #[error("Internal server error")] - InternalServerError, - - #[error("Invalid captcha")] - InvalidCaptcha, - - #[error("Missing host")] - MissingHost, - - #[error("Not found")] - NotFound, - - #[error("Registrations closed")] - RegistrationsClosed, - - #[error("Unauthorised")] - Unauthorised, - - #[error("Unsupported media type")] - UnsupportedMediaType, - - #[error("Username already taken")] - UsernameTaken, -} diff --git a/crates/kitsune-core/src/lib.rs b/crates/kitsune-core/src/lib.rs index 5d0274893..7bda6622b 100644 --- a/crates/kitsune-core/src/lib.rs +++ b/crates/kitsune-core/src/lib.rs @@ -9,9 +9,6 @@ forbidden_lint_groups )] -#[macro_use] -extern crate tracing; - pub mod error; pub mod event; //pub mod mapping; diff --git a/kitsune/Cargo.toml b/kitsune/Cargo.toml index 5d8c1c950..92e078fa2 100644 --- a/kitsune/Cargo.toml +++ b/kitsune/Cargo.toml @@ -115,5 +115,5 @@ graphql-api = [ "speedy-uuid/async-graphql", ] mastodon-api = ["kitsune-core/mastodon-api"] -meilisearch = ["kitsune-core/meilisearch"] +meilisearch = ["kitsune-search/meilisearch"] oidc = ["dep:kitsune-oidc"]