diff --git a/core/src/tiny/identity/mod.rs b/core/src/tiny/identity/mod.rs deleted file mode 100644 index f64f7e4..0000000 --- a/core/src/tiny/identity/mod.rs +++ /dev/null @@ -1,28 +0,0 @@ -use axum::{routing::get, Json, Router}; -#[allow(unused)] -use log::{info, debug, warn, error, trace}; -use tracing::instrument; - -use super::response::SigmaInformation; - -const NAME: &str = "TinyIdentity"; -const VERSION: &str = "0.0.0.1"; - -pub fn router() -> Router { - info!("Loading {NAME} app routes"); - debug!("{NAME} version is {VERSION}"); - Router::new() - .route("/", get(information)) - .route("/setup", get(dummy)) - .route("/me", get(dummy)) -} - -#[instrument] -async fn dummy() -> Json<()> { - Json(()) -} - -#[instrument] -async fn information() -> Json { - Json(SigmaInformation::new(NAME, VERSION)) -} \ No newline at end of file diff --git a/core/src/tiny/mod.rs b/core/src/tiny/mod.rs index 81ffd7d..9039c4e 100644 --- a/core/src/tiny/mod.rs +++ b/core/src/tiny/mod.rs @@ -1,8 +1,5 @@ -mod response; -mod identity; - use axum::{routing::get, Json, Router}; -use response::SigmaInformation; +use sigma::repsonse::SigmaInformation; use tracing::instrument; #[allow(unused)] diff --git a/core/src/tiny/response.rs b/core/src/tiny/response.rs deleted file mode 100644 index 7b6a2f5..0000000 --- a/core/src/tiny/response.rs +++ /dev/null @@ -1,15 +0,0 @@ -use serde::Serialize; - -#[derive(Serialize)] -pub struct SigmaInformation { - name: String, - version: String, -} -impl SigmaInformation { - pub fn new(name: &str, version: &str) -> Self { - Self { - version: version.into(), - name: name.into() - } - } -} \ No newline at end of file diff --git a/sigma/src/error.rs b/sigma/src/error.rs index b91a3c7..22fbd8c 100644 --- a/sigma/src/error.rs +++ b/sigma/src/error.rs @@ -1,4 +1,4 @@ pub enum Error { TcpBindFailed = 1, - AxumAppExited = 2, + AxumAppExited, } \ No newline at end of file