diff --git a/src/main.rs b/src/main.rs index 93e7ed911a..41513dbf48 100644 --- a/src/main.rs +++ b/src/main.rs @@ -25,8 +25,9 @@ use { rarity::Rarity, sat::Sat, sat_point::SatPoint, - subcommand::{server::templates::ContentHtml, Subcommand}, + subcommand::Subcommand, tally::Tally, + templates::ContentHtml, }, anyhow::{anyhow, bail, Context, Error}, bitcoin::{ @@ -90,6 +91,7 @@ mod sat; mod sat_point; mod subcommand; mod tally; +mod templates; type Result = std::result::Result; diff --git a/src/subcommand.rs b/src/subcommand.rs index f5b6995374..2cea1ec096 100644 --- a/src/subcommand.rs +++ b/src/subcommand.rs @@ -6,7 +6,7 @@ mod index; mod info; mod list; mod parse; -pub(crate) mod server; +mod server; mod subsidy; mod supply; mod traits; diff --git a/src/subcommand/server.rs b/src/subcommand/server.rs index 92335f262e..2ecb0b9534 100644 --- a/src/subcommand/server.rs +++ b/src/subcommand/server.rs @@ -1,12 +1,10 @@ use super::*; use { - self::{ - deserialize_from_str::DeserializeFromStr, - templates::{ - BlockHtml, ClockSvg, HomeHtml, InputHtml, InscriptionHtml, InscriptionsHtml, OutputHtml, - PageContent, PageHtml, RangeHtml, RareTxt, SatHtml, TransactionHtml, - }, + self::deserialize_from_str::DeserializeFromStr, + crate::templates::{ + BlockHtml, ClockSvg, HomeHtml, InputHtml, InscriptionHtml, InscriptionsHtml, OutputHtml, + PageContent, PageHtml, RangeHtml, RareTxt, SatHtml, TransactionHtml, }, axum::{ body, @@ -30,7 +28,6 @@ use { }; mod deserialize_from_str; -pub(crate) mod templates; enum BlockQuery { Height(u64), diff --git a/src/subcommand/server/templates.rs b/src/templates.rs similarity index 100% rename from src/subcommand/server/templates.rs rename to src/templates.rs diff --git a/src/subcommand/server/templates/block.rs b/src/templates/block.rs similarity index 100% rename from src/subcommand/server/templates/block.rs rename to src/templates/block.rs diff --git a/src/subcommand/server/templates/clock.rs b/src/templates/clock.rs similarity index 100% rename from src/subcommand/server/templates/clock.rs rename to src/templates/clock.rs diff --git a/src/subcommand/server/templates/content.rs b/src/templates/content.rs similarity index 100% rename from src/subcommand/server/templates/content.rs rename to src/templates/content.rs diff --git a/src/subcommand/server/templates/home.rs b/src/templates/home.rs similarity index 100% rename from src/subcommand/server/templates/home.rs rename to src/templates/home.rs diff --git a/src/subcommand/server/templates/input.rs b/src/templates/input.rs similarity index 100% rename from src/subcommand/server/templates/input.rs rename to src/templates/input.rs diff --git a/src/subcommand/server/templates/inscription.rs b/src/templates/inscription.rs similarity index 100% rename from src/subcommand/server/templates/inscription.rs rename to src/templates/inscription.rs diff --git a/src/subcommand/server/templates/inscriptions.rs b/src/templates/inscriptions.rs similarity index 100% rename from src/subcommand/server/templates/inscriptions.rs rename to src/templates/inscriptions.rs diff --git a/src/subcommand/server/templates/output.rs b/src/templates/output.rs similarity index 100% rename from src/subcommand/server/templates/output.rs rename to src/templates/output.rs diff --git a/src/subcommand/server/templates/range.rs b/src/templates/range.rs similarity index 100% rename from src/subcommand/server/templates/range.rs rename to src/templates/range.rs diff --git a/src/subcommand/server/templates/rare.rs b/src/templates/rare.rs similarity index 100% rename from src/subcommand/server/templates/rare.rs rename to src/templates/rare.rs diff --git a/src/subcommand/server/templates/sat.rs b/src/templates/sat.rs similarity index 100% rename from src/subcommand/server/templates/sat.rs rename to src/templates/sat.rs diff --git a/src/subcommand/server/templates/transaction.rs b/src/templates/transaction.rs similarity index 100% rename from src/subcommand/server/templates/transaction.rs rename to src/templates/transaction.rs