change fn name
This commit is contained in:
parent
23774abc1b
commit
2a3045e5da
1 changed files with 2 additions and 2 deletions
|
@ -3,14 +3,14 @@ use askama::Template;
|
||||||
|
|
||||||
#[get("/")]
|
#[get("/")]
|
||||||
pub async fn page() -> impl Responder {
|
pub async fn page() -> impl Responder {
|
||||||
HttpResponse::Ok().body(get_index())
|
HttpResponse::Ok().body(get_page())
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Template)]
|
#[derive(Template)]
|
||||||
#[template(path = "../templates/index.html")]
|
#[template(path = "../templates/index.html")]
|
||||||
struct IndexTemplate {}
|
struct IndexTemplate {}
|
||||||
|
|
||||||
pub fn get_index() -> std::string::String {
|
pub fn get_page() -> std::string::String {
|
||||||
let index = IndexTemplate {};
|
let index = IndexTemplate {};
|
||||||
|
|
||||||
index.render().unwrap()
|
index.render().unwrap()
|
||||||
|
|
Loading…
Reference in a new issue