Skip to content

Commit ca360e0

Browse files
authored
Introduce better app meta (#36)
* Introduce better app meta * Minor fixes
1 parent 022563a commit ca360e0

File tree

11 files changed

+501
-71
lines changed

11 files changed

+501
-71
lines changed

server/Cargo.lock

+150-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

server/Cargo.toml

-3
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,3 @@ serde_with = "3.3.0"
5353
bech32 = "0.10.0-alpha"
5454
crc32fast = "1.3.2"
5555
ciborium = "0.2.1"
56-
57-
[build-dependencies]
58-
chrono = "0.4.24"

server/build.rs

-29
This file was deleted.

server/src/routes/root.rs

+3-16
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,7 @@
11
use axum::Json;
2-
use std::env;
3-
4-
#[derive(Debug, serde::Serialize)]
5-
pub struct AppVersion {
6-
rev: String,
7-
name: String,
8-
semver: String,
9-
compile_time: String,
10-
}
2+
use enstate_shared::meta::{AppMeta, APP_META};
113

124
#[allow(clippy::unused_async)]
13-
pub async fn get() -> Json<AppVersion> {
14-
Json(AppVersion {
15-
rev: env!("GIT_REV").to_string(),
16-
name: env!("CARGO_PKG_NAME").to_string(),
17-
semver: env!("CARGO_PKG_VERSION").to_string(),
18-
compile_time: env!("STATIC_BUILD_DATE").to_string(),
19-
})
5+
pub async fn get() -> Json<AppMeta> {
6+
Json(APP_META.clone())
207
}

0 commit comments

Comments
 (0)