diff --git a/server/src/api/mod.rs b/server/src/api/mod.rs index da5c4d1..50cfc8a 100644 --- a/server/src/api/mod.rs +++ b/server/src/api/mod.rs @@ -7,23 +7,46 @@ pub mod stats; pub mod ws; use axum::{routing::{get, post}, Json, Router}; +use axum::response::Html; use tower_http::cors::CorsLayer; use crate::state::SharedState; -async fn index() -> Json { - Json(serde_json::json!({ - "service": "ares-next", - "version": env!("CARGO_PKG_VERSION"), - "endpoints": [ - "GET /api/v1/health", - "GET /api/v1/search?q=...", - "GET /api/v1/files/{file_id}", - "POST /api/v1/announce", - "GET /api/v1/peers/{file_id}", - "GET /api/v1/stats", - "WS /api/v1/tracker/ws" - ] - })) +async fn index() -> Html<&'static str> { + Html(r#" + + + + +Ares Next + + + +
+

Ares Next

+ online +

Tracker P2P + busca de arquivos por hash — API pública

+ +
+ +"#) } pub fn router(state: SharedState) -> Router {