feat(server): stats globais e rate limit por peer
This commit is contained in:
@@ -3,6 +3,7 @@ pub mod files;
|
||||
pub mod health;
|
||||
pub mod peers;
|
||||
pub mod search;
|
||||
pub mod stats;
|
||||
pub mod ws;
|
||||
|
||||
use axum::{routing::{get, post}, Router};
|
||||
@@ -16,6 +17,7 @@ pub fn router(state: SharedState) -> Router {
|
||||
.route("/files/{file_id}", get(files::get_file))
|
||||
.route("/announce", post(announce::announce))
|
||||
.route("/peers/{file_id}", get(peers::peers))
|
||||
.route("/stats", get(stats::stats))
|
||||
.route("/tracker/ws", get(ws::ws_handler))
|
||||
.with_state(state);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user