Add empty /commit/ page
This commit is contained in:
parent
eb29f1166a
commit
965efa5b58
4 changed files with 32 additions and 0 deletions
20
src/web/commit.rs
Normal file
20
src/web/commit.rs
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
use askama::Template;
|
||||
use axum::{extract::State, response::IntoResponse};
|
||||
|
||||
use crate::{config::Config, somehow};
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "commit.html")]
|
||||
struct CommitTemplate {
|
||||
base: String,
|
||||
repo_name: String,
|
||||
current: String,
|
||||
}
|
||||
|
||||
pub async fn get(State(config): State<&'static Config>) -> somehow::Result<impl IntoResponse> {
|
||||
Ok(CommitTemplate {
|
||||
base: config.web.base(),
|
||||
repo_name: config.repo.name(),
|
||||
current: "commit".to_string(),
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue