This commit is contained in:
2025-10-08 00:31:06 +02:00
parent 6303d1e856
commit 4494551071

View File

@@ -17,16 +17,13 @@ fn api() -> Router {
Router::new() Router::new()
.route("/", get(async || StatusCode::OK)) .route("/", get(async || StatusCode::OK))
.route("/live", get(async || StatusCode::OK)) .route("/live", get(async || StatusCode::OK))
.route("/discord/member-count", get(get_member_count)) .route("/discord-member-count", get(get_member_count))
.route("/days/community", get(get_days_since_community_formation)) .route("/days-community", get(get_days_since_community_formation))
.fallback(api_fallback) .fallback(api_fallback)
} }
async fn api_fallback() -> (StatusCode, String) { async fn api_fallback() -> (StatusCode, String) {
( (StatusCode::NOT_FOUND, "Resource not found. Sorry!".into())
StatusCode::NOT_FOUND,
"This URL isn't specified by our API. Sorry!".into(),
)
} }
async fn get_member_count() -> (StatusCode, String) { async fn get_member_count() -> (StatusCode, String) {