refactor!: add ws endpoint, storage trait

This commit is contained in:
2026-02-09 23:56:10 -08:00
parent c4e198de83
commit b614def39d
18 changed files with 383 additions and 117 deletions

View File

@@ -0,0 +1,8 @@
use actix_web::{HttpResponse, web};
use crate::{AppState, error::Result, storage::StorageImpl};
pub async fn get_peers(app_state: web::Data<AppState>) -> Result<HttpResponse> {
let peers = app_state.storage.get_peers().await?;
Ok(HttpResponse::Ok().json(peers))
}