Redesign node view and use it as the landing-page

This commit is contained in:
Rūdolfs Ošiņš
2024-07-26 10:20:01 +02:00
parent 266afb17c8
commit c0049f83ba
50 changed files with 1051 additions and 1021 deletions
+5 -3
View File
@@ -15,7 +15,7 @@ use radicle::Node;
use crate::api::error::Error;
use crate::api::Context;
use crate::axum_extra::Path;
use crate::axum_extra::{cached_response, Path};
pub fn router(ctx: Context) -> Router {
Router::new()
@@ -84,13 +84,15 @@ async fn node_handler(State(ctx): State<Context>) -> impl IntoResponse {
}
};
Ok::<_, Error>(Json(Response::new(
let response = Response::new(
node_id,
agent,
config,
node_state.to_string(),
ctx.profile.config.web.clone(),
)))
);
Ok::<_, Error>(cached_response(response, 600))
}
/// Return stored information about other nodes.