Move server code into its own module
This commit is contained in:
parent
ad0c1a69cb
commit
45abda2b6d
12 changed files with 15 additions and 4 deletions
18
src/server/web/commit.rs
Normal file
18
src/server/web/commit.rs
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
use askama::Template;
|
||||
use axum::{extract::State, response::IntoResponse};
|
||||
|
||||
use crate::{config::Config, somehow};
|
||||
|
||||
use super::{Base, Tab};
|
||||
|
||||
#[derive(Template)]
|
||||
#[template(path = "commit.html")]
|
||||
struct CommitTemplate {
|
||||
base: Base,
|
||||
}
|
||||
|
||||
pub async fn get(State(config): State<&'static Config>) -> somehow::Result<impl IntoResponse> {
|
||||
Ok(CommitTemplate {
|
||||
base: Base::new(config, Tab::Commit),
|
||||
})
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue