commit a5ba67fef2d91e979541dd31724a05daabad9232 parent 44da9e6ca7b42fa6c02bc5e80e9dda83240004e7 Author: Daniel GarcĂa <dani-garcia@users.noreply.github.com> Date: Mon, 18 Oct 2021 21:13:29 +0200 Merge branch 'BlackDex-alive-db-check' into main Diffstat:
M | src/api/web.rs | | | 4 | +++- |
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git 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;