xesite/src/handlers/mod.rs

18 lines
486 B
Rust
Raw Normal View History

2020-07-12 22:39:50 +00:00
use crate::templates::{self, RenderRucte};
use warp::{
http::{Response, StatusCode},
path, Filter, Rejection, Reply,
};
pub async fn index() -> Result<impl Reply, Rejection> {
Response::builder().html(|o| templates::index_html(o))
}
2020-07-12 22:58:38 +00:00
pub async fn contact() -> Result<impl Reply, Rejection> {
Response::builder().html(|o| templates::contact_html(o))
}
pub async fn feeds() -> Result<impl Reply, Rejection> {
Response::builder().html(|o| templates::feeds_html(o))
}