aboutsummaryrefslogtreecommitdiffstats
path: root/crates/api-base/src/health
diff options
context:
space:
mode:
authorrtkay123 <dev@kanjala.com>2026-04-04 10:51:18 +0200
committerrtkay123 <dev@kanjala.com>2026-04-04 10:51:18 +0200
commit19c25138f88acf19c9a959a58de4f58e54026ebc (patch)
treebd854f20c539770a92fb451503b4c6d132c110a6 /crates/api-base/src/health
parent41d90f42c37df06dabfd717d19f3dc72b5ba2d11 (diff)
downloadsellershut-19c25138f88acf19c9a959a58de4f58e54026ebc.tar.bz2
sellershut-19c25138f88acf19c9a959a58de4f58e54026ebc.zip
feat: connect to db
Diffstat (limited to 'crates/api-base/src/health')
-rw-r--r--crates/api-base/src/health/apidoc.rs12
-rw-r--r--crates/api-base/src/health/mod.rs27
2 files changed, 0 insertions, 39 deletions
diff --git a/crates/api-base/src/health/apidoc.rs b/crates/api-base/src/health/apidoc.rs
deleted file mode 100644
index 45b8754..0000000
--- a/crates/api-base/src/health/apidoc.rs
+++ /dev/null
@@ -1,12 +0,0 @@
-use utoipa::OpenApi;
-
-use crate::Version;
-
-#[derive(OpenApi)]
-#[openapi(
- tags(
- (name = "sellershut", description = "API health check"),
- ),
- components(schemas(Version))
-)]
-pub struct ApiDocBase;
diff --git a/crates/api-base/src/health/mod.rs b/crates/api-base/src/health/mod.rs
deleted file mode 100644
index a84dc85..0000000
--- a/crates/api-base/src/health/mod.rs
+++ /dev/null
@@ -1,27 +0,0 @@
-#[cfg(feature = "utoipa")]
-mod apidoc;
-
-#[cfg(feature = "utoipa")]
-pub use apidoc::*;
-
-#[derive(Default)]
-pub struct BaseService;
-
-impl HealthDriver for BaseService {}
-
-pub trait HealthDriver: Send + Sync {
- fn health(&self, app: &str, version: &str) -> String {
- format!("{app} v{version} is live")
- }
-}
-
-#[cfg(test)]
-mod tests {
- use crate::health::{BaseService, HealthDriver};
-
- #[test]
- fn health() {
- let app = BaseService.health(env!("CARGO_PKG_NAME"), env!("CARGO_PKG_VERSION"));
- assert!(app.contains("is live"));
- }
-}