Skip to content

Commit

Permalink
Introduce better app meta (#36)
Browse files Browse the repository at this point in the history
* Introduce better app meta

* Minor fixes
  • Loading branch information
Antony1060 authored Dec 9, 2023
1 parent 022563a commit ca360e0
Show file tree
Hide file tree
Showing 11 changed files with 501 additions and 71 deletions.
152 changes: 150 additions & 2 deletions server/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 0 additions & 3 deletions server/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,3 @@ serde_with = "3.3.0"
bech32 = "0.10.0-alpha"
crc32fast = "1.3.2"
ciborium = "0.2.1"

[build-dependencies]
chrono = "0.4.24"
29 changes: 0 additions & 29 deletions server/build.rs

This file was deleted.

19 changes: 3 additions & 16 deletions server/src/routes/root.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,7 @@
use axum::Json;
use std::env;

#[derive(Debug, serde::Serialize)]
pub struct AppVersion {
rev: String,
name: String,
semver: String,
compile_time: String,
}
use enstate_shared::meta::{AppMeta, APP_META};

#[allow(clippy::unused_async)]
pub async fn get() -> Json<AppVersion> {
Json(AppVersion {
rev: env!("GIT_REV").to_string(),
name: env!("CARGO_PKG_NAME").to_string(),
semver: env!("CARGO_PKG_VERSION").to_string(),
compile_time: env!("STATIC_BUILD_DATE").to_string(),
})
pub async fn get() -> Json<AppMeta> {
Json(APP_META.clone())
}
Loading

0 comments on commit ca360e0

Please sign in to comment.