diff --git a/src/admin/mod.rs b/src/admin/mod.rs index 42a08d3..4048ccc 100644 --- a/src/admin/mod.rs +++ b/src/admin/mod.rs @@ -3,7 +3,6 @@ use axum::{routing::get, routing::post, Router}; use crate::state::AppState; pub mod domain; -pub mod example; pub mod state; pub mod views; diff --git a/src/admin_examples/mod.rs b/src/admin_examples/mod.rs new file mode 100644 index 0000000..33a2995 --- /dev/null +++ b/src/admin_examples/mod.rs @@ -0,0 +1 @@ +pub mod static_repository; diff --git a/src/admin/example.rs b/src/admin_examples/static_repository.rs similarity index 95% rename from src/admin/example.rs rename to src/admin_examples/static_repository.rs index 65dfcdc..58ebfc1 100644 --- a/src/admin/example.rs +++ b/src/admin_examples/static_repository.rs @@ -1,7 +1,7 @@ // implementation of static repository -use super::domain::*; -use super::state::AdminRegistry; +use crate::admin::domain::*; +use crate::admin::state::AdminRegistry; use log::{debug, warn}; use serde_json::{json, Value}; diff --git a/src/main.rs b/src/main.rs index e956f69..c8044b2 100644 --- a/src/main.rs +++ b/src/main.rs @@ -1,11 +1,12 @@ mod admin; +mod admin_examples; mod howto; mod service; mod state; -use crate::admin::example; use crate::service::{handlers, templates}; use crate::state::AppState; +use admin_examples::static_repository; use axum::{ extract::State, handler::HandlerWithoutStateExt, response::IntoResponse, routing::get, Router, }; @@ -34,7 +35,7 @@ async fn main() { // Prepare App State let tmpl = templates::Templates::initialize().expect("Template Engine could not be loaded."); let mut admin = admin::state::AdminRegistry::new("admin"); - example::register_example(&mut admin); + static_repository::register_example(&mut admin); let state: AppState = AppState { templates: tmpl,