aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel García <[email protected]>2021-10-18 21:13:29 +0200
committerDaniel García <[email protected]>2021-10-18 21:13:29 +0200
commita5ba67fef2d91e979541dd31724a05daabad9232 (patch)
treed489b6102b6f0f886d6fb96f598e38d2c458c5f6
parent44da9e6ca7b42fa6c02bc5e80e9dda83240004e7 (diff)
parent881524bd5466c19875403b46915ac2ec5762b0ca (diff)
downloadvaultwarden-a5ba67fef2d91e979541dd31724a05daabad9232.tar.gz
vaultwarden-a5ba67fef2d91e979541dd31724a05daabad9232.zip
Merge branch 'BlackDex-alive-db-check' into main
-rw-r--r--src/api/web.rs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/api/web.rs b/src/api/web.rs
index 9980179f..9c960c27 100644
--- a/src/api/web.rs
+++ b/src/api/web.rs
@@ -64,8 +64,10 @@ fn attachments(uuid: SafeString, file_id: SafeString) -> Option<NamedFile> {
NamedFile::open(Path::new(&CONFIG.attachments_folder()).join(uuid).join(file_id)).ok()
}
+// We use DbConn here to let the alive healthcheck also verify the database connection.
+use crate::db::DbConn;
#[get("/alive")]
-fn alive() -> Json<String> {
+fn alive(_conn: DbConn) -> Json<String> {
use crate::util::format_date;
use chrono::Utc;