1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27
//! Routes for health checks
use rocket::{Build, Rocket};
pub async fn init(rocket: Rocket<Build>) -> Rocket<Build> {
rocket.mount("/", routes![health_check, health_content, health_burrow,])
}
/// Health check
///
/// ## Returns
///
/// - `Status`: "Ok"
#[get("/health")]
async fn health_check() -> String {
"Ok".to_string()
}
#[get("/content/posts/undefined")]
async fn health_content() -> String {
"Ok".to_string()
}
#[get("/burrows/undefined")]
async fn health_burrow() -> String {
"Ok".to_string()
}