summaryrefslogtreecommitdiff
path: root/src/blog/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/blog/mod.rs')
-rw-r--r--src/blog/mod.rs12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/blog/mod.rs b/src/blog/mod.rs
index 199d6db..3640bcd 100644
--- a/src/blog/mod.rs
+++ b/src/blog/mod.rs
@@ -1,10 +1,18 @@
+pub mod post;
pub mod handlers {
+use std::sync::Arc;
+
use warp::{Reply, Rejection};
use warp::http::Response;
+use crate::templates::{self, Html, RenderRucte};
+
+use crate::internal::SiteState;
- pub async fn list() -> Result<impl Reply, Rejection> {
- Ok("test")
+ pub async fn list(state: Arc<SiteState>) -> Result<impl Reply, Rejection> {
+ let state = state.clone();
+ Response::builder()
+ .html(|o| templates::index_html(o))
}
pub async fn post(name: String) -> Result<impl Reply, Rejection> {