Skip to content

Commit 71d444e

Browse files
authored
Merge pull request #10 from habibi-dev/develop
✨ feat(index): Add index route and template, include version and stats.
2 parents ac1780f + 4c280c6 commit 71d444e

3 files changed

Lines changed: 6 additions & 6 deletions

File tree

src/services/index/mod.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1+
use crate::services::AppState;
2+
use crate::services::health::response::EndpointStats;
13
use crate::utility::url;
24
use askama::Template;
5+
use axum::extract::State;
36
use axum::response::{Html, IntoResponse, Response};
47
use std::env;
5-
use axum::extract::State;
6-
use crate::services::AppState;
7-
use crate::services::health::response::EndpointStats;
88

99
#[derive(Template)]
1010
#[template(path = "index.html")]
@@ -13,7 +13,7 @@ struct IndexTemplate {
1313
version: String,
1414
url: String,
1515
domain: String,
16-
stats: EndpointStats ,
16+
stats: EndpointStats,
1717
}
1818

1919
impl IntoResponse for IndexTemplate {

src/services/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
pub mod cache;
22
mod country;
33
mod health;
4+
mod index;
45
mod ip;
56
pub mod jobs;
67
pub mod routes;
78
mod time;
8-
mod index;
99

1010
pub use cache::StatsCache;
1111
use sea_orm::DatabaseConnection;

src/services/routes.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,4 +41,4 @@ impl Routes {
4141
}
4242
app
4343
}
44-
}
44+
}

0 commit comments

Comments
 (0)