diff --git a/src/subcommand/server.rs b/src/subcommand/server.rs index e7fc497d4d..49373d2c47 100644 --- a/src/subcommand/server.rs +++ b/src/subcommand/server.rs @@ -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", @@ -618,6 +619,21 @@ impl Server { }) } + async fn output_recursive( + Extension(server_config): Extension>, + Extension(index): Extension>, + Path(outpoint): Path, + ) -> ServerResult { + let accept_json = AcceptJson(true); + Self::output( + Extension(server_config), + Extension(index), + Path(outpoint), + accept_json, + ) + .await + } + async fn satpoint( Extension(index): Extension>, Path(satpoint): Path,