-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Introduce better app meta * Minor fixes
- Loading branch information
1 parent
022563a
commit ca360e0
Showing
11 changed files
with
501 additions
and
71 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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()) | ||
} |
Oops, something went wrong.