mirror of
https://github.com/cupcakearmy/cryptgeon.git
synced 2026-04-02 18:05:23 +00:00
refactor to use axum
This commit is contained in:
@@ -1,3 +1,10 @@
|
||||
mod routes;
|
||||
use crate::store;
|
||||
use axum::http::StatusCode;
|
||||
|
||||
pub use routes::*;
|
||||
pub async fn report_health() -> (StatusCode,) {
|
||||
if store::can_reach_redis() {
|
||||
return (StatusCode::OK,);
|
||||
} else {
|
||||
return (StatusCode::SERVICE_UNAVAILABLE,);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user