Skip to content

Commit

Permalink
adding route /peers
Browse files Browse the repository at this point in the history
  • Loading branch information
tanneberger committed Mar 26, 2024
1 parent b11a973 commit 4c9acb7
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/routes/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use tower_http::services::ServeDir;
use crate::routes::documents::list_documents;
use crate::routes::lists::add_subscriber;
use crate::routes::news::{find_keywords, find_post, list_posts};
use crate::routes::peers::get_peers_and_supporter;
use crate::routes::stats::get_stats;
use crate::routes::team::get_team;
use crate::routes::text_blocks::find_text_block;
Expand Down Expand Up @@ -47,4 +48,5 @@ pub(crate) fn route(content_paths: &ContentPaths) -> Router<FoundationState> {
.nest_service("/team/assets", ServeDir::new(&content_paths.team))
.route("/mailing_lists/:list", post(add_subscriber))
.route("/stats", get(get_stats))
.route("/peers", get(get_peers_and_supporter))
}
2 changes: 1 addition & 1 deletion src/routes/peers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use tracing::error;

use crate::state::FoundationState;

pub(super) async fn get_peers(
pub(super) async fn get_peers_and_supporter(
State(state): State<FoundationState>,
) -> Result<Json<Vec<FoundationEntity>>, StatusCode> {
match state.peers.get_stats().await {
Expand Down

0 comments on commit 4c9acb7

Please sign in to comment.