summaryrefslogtreecommitdiff
path: root/src/handlers/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/handlers/mod.rs')
-rw-r--r--src/handlers/mod.rs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/handlers/mod.rs b/src/handlers/mod.rs
index d346512..9d5aa54 100644
--- a/src/handlers/mod.rs
+++ b/src/handlers/mod.rs
@@ -7,10 +7,12 @@ use tower_http::add_extension::AddExtensionLayer;
use tower_http::services::ServeDir;
use admin::{admin_healthcheck, admin_middleware, upload_story};
-use frontend::home;
+use frontend_builder::home;
+
+use self::frontend_builder::{build_page, DummyProduct};
mod admin;
-mod frontend;
+mod frontend_builder;
#[derive(Debug, Clone)]
struct ApiContext {
@@ -23,6 +25,7 @@ pub async fn router(pool: SqlitePool) -> Router {
.route("/admin", get(admin_healthcheck))
.layer(middleware::from_fn(admin_middleware))
.route("/", get(home))
+ .route("/stories", get(build_page::<DummyProduct>))
.nest_service("/static", ServeDir::new("src/static"))
.layer(DefaultBodyLimit::max(1074000000))
.layer(AddExtensionLayer::new(ApiContext { pool }))