summaryrefslogblamecommitdiff
path: root/src/blog/mod.rs
blob: 3640bcdb1649d3ad2213fa5a7704a71265921531 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
             

                  

                   

                             


                                                
 



                                                                               





                                                                      
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")
    }
}