blob: 3640bcdb1649d3ad2213fa5a7704a71265921531 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
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(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> {
Ok("Post test")
}
}
|