镜像来自
https://github.com/meilisearch/MeiliSearch
已同步 2025-07-03 20:07:09 +02:00
Merge remote-tracking branch 'origin/main' into snapshots
This commit is contained in:
當前提交
248e9b3808
共有 3 個文件被更改,包括 36 次插入 和 3 次删除
|
@ -56,9 +56,18 @@ struct VersionResponse {
|
|||
|
||||
#[get("/version", wrap = "Authentication::Private")]
|
||||
async fn get_version() -> HttpResponse {
|
||||
let commit_sha = match option_env!("COMMIT_SHA") {
|
||||
Some("") | None => env!("VERGEN_SHA"),
|
||||
Some(commit_sha) => commit_sha
|
||||
};
|
||||
let commit_date = match option_env!("COMMIT_DATE") {
|
||||
Some("") | None => env!("VERGEN_COMMIT_DATE"),
|
||||
Some(commit_date) => commit_date
|
||||
};
|
||||
|
||||
HttpResponse::Ok().json(VersionResponse {
|
||||
commit_sha: env!("VERGEN_SHA").to_string(),
|
||||
build_date: env!("VERGEN_BUILD_TIMESTAMP").to_string(),
|
||||
commit_sha: commit_sha.to_string(),
|
||||
build_date: commit_date.to_string(),
|
||||
pkg_version: env!("CARGO_PKG_VERSION").to_string(),
|
||||
})
|
||||
}
|
||||
|
|
載入中…
Add table
Add a link
Reference in a new issue