Skip to content

Commit

Permalink
Update server.rs with output_recursive
Browse files Browse the repository at this point in the history
  • Loading branch information
1stBitcoinSent authored Nov 5, 2024
1 parent 95a9f60 commit fd2aa80
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions src/subcommand/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,6 +211,7 @@ impl Server {
get(Self::parents_paginated),
)
.route("/preview/:inscription_id", get(Self::preview))
.route("/r/output/:output", get(Self::output_recursive))
.route("/r/blockhash", get(Self::block_hash_json))
.route(
"/r/blockhash/:height",
Expand Down Expand Up @@ -618,6 +619,21 @@ impl Server {
})
}

async fn output_recursive(
Extension(server_config): Extension<Arc<ServerConfig>>,
Extension(index): Extension<Arc<Index>>,
Path(outpoint): Path<OutPoint>,
) -> ServerResult {
let accept_json = AcceptJson(true);
Self::output(
Extension(server_config),
Extension(index),
Path(outpoint),
accept_json,
)
.await
}

async fn satpoint(
Extension(index): Extension<Arc<Index>>,
Path(satpoint): Path<SatPoint>,
Expand Down

0 comments on commit fd2aa80

Please sign in to comment.