90: restore version route r=MarinPostma a=MarinPostma

close #74


Co-authored-by: mpostma <postma.marin@protonmail.com>
This commit is contained in:
bors[bot] 2021-03-16 13:53:23 +00:00 committed by GitHub
commit c6dbd81823
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 24 additions and 3 deletions

View file

@ -56,5 +56,9 @@ struct VersionResponse {
#[get("/version", wrap = "Authentication::Private")]
async fn get_version() -> HttpResponse {
todo!()
HttpResponse::Ok().json(VersionResponse {
commit_sha: env!("VERGEN_SHA").to_string(),
build_date: env!("VERGEN_BUILD_TIMESTAMP").to_string(),
pkg_version: env!("CARGO_PKG_VERSION").to_string(),
})
}