feat: expose source code url in build details meta endpoint

This commit is contained in:
Aravinth Manivannan 2022-03-29 17:38:29 +05:30
parent da98218d31
commit 3c40a32fba
Signed by: realaravinth
GPG Key ID: AD9F0F08E855ED88
1 changed files with 2 additions and 0 deletions

View File

@ -23,6 +23,7 @@ use crate::{GIT_COMMIT_HASH, VERSION};
pub struct BuildDetails {
pub version: &'static str,
pub git_commit_hash: &'static str,
pub source_code: &'static str,
}
pub mod routes {
@ -47,6 +48,7 @@ async fn build_details() -> impl Responder {
let build = BuildDetails {
version: VERSION,
git_commit_hash: GIT_COMMIT_HASH,
source_code: &crate::SETTINGS.source_code,
};
HttpResponse::Ok().json(build)
}