Group base template parameters
This commit is contained in:
parent
729b3ba672
commit
90a446a576
7 changed files with 46 additions and 33 deletions
|
|
@ -3,18 +3,16 @@ use axum::{extract::State, response::IntoResponse};
|
|||
|
||||
use crate::{config::Config, somehow};
|
||||
|
||||
use super::{Base, Tab};
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "commit.html")]
|
||||
struct CommitTemplate {
|
||||
base: String,
|
||||
repo_name: String,
|
||||
current: &'static str,
|
||||
base: Base,
|
||||
}
|
||||
|
||||
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",
|
||||
base: Base::new(config, Tab::Commit),
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue