Skip to content

Commit

Permalink
fix: api.
Browse files Browse the repository at this point in the history
  • Loading branch information
chinyuchan committed Jun 25, 2024
1 parent ea11561 commit 9e81298
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions explorer/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,28 +63,28 @@ async fn main() -> Result<()> {
.route("/api/address/count", get(get_address_count))
.route("/api/chain/statistics", get(get_statistics))
.route("/api/txs/distribute", get(get_tx_distribute))
.route("/api/v2/txs/distribute", get(get_tx_distribute))
.route("/api/v2/address/count", get(get_address_count))
.route("/api/v2/chain/statistic", get(get_statistics))
.route("/api/v2/number/block", get(get_block_by_num))
.route("/api/v2/hash/block", get(get_block_by_hash))
.route("/api/v2/blocks", get(get_blocks))
.route("/api/v2/hash/tx", get(get_tx_by_hash))
.route("/api/v2/txs", get(get_txs))
.route("/api/v2/assets", get(get_assets))
.route("/api/v2/hash/claim", get(get_claim_by_tx_hash))
.route("/api/v2/claims", get(get_claims))
.route("/api/v2/hash/delegation", get(get_delegation_by_tx_hash))
.route("/api/v2/delegations", get(get_delegations))
.route("/api/txs/distribute", get(get_tx_distribute))
.route("/api/address/count", get(get_address_count))
.route("/api/chain/statistic", get(get_statistics))
.route("/api/number/block", get(get_block_by_num))
.route("/api/hash/block", get(get_block_by_hash))
.route("/api/blocks", get(get_blocks))
.route("/api/hash/tx", get(get_tx_by_hash))
.route("/api/txs", get(get_txs))
.route("/api/assets", get(get_assets))
.route("/api/hash/claim", get(get_claim_by_tx_hash))
.route("/api/claims", get(get_claims))
.route("/api/hash/delegation", get(get_delegation_by_tx_hash))
.route("/api/delegations", get(get_delegations))
.route(
"/api/v2/hash/undelegation",
"/api/hash/undelegation",
get(get_undelegation_by_tx_hash),
)
.route("/api/v2/undelegations", get(get_undelegations))
.route("/api/v2/hash/n2e", get(get_n2e_by_tx_hash))
.route("/api/v2/n2es", get(get_n2e_txs))
.route("/api/v2/hash/e2n", get(get_e2n_by_tx_hash))
.route("/api/v2/e2ns", get(get_e2n_txs))
.route("/api/undelegations", get(get_undelegations))
.route("/api/hash/n2e", get(get_n2e_by_tx_hash))
.route("/api/n2es", get(get_n2e_txs))
.route("/api/hash/e2n", get(get_e2n_by_tx_hash))
.route("/api/e2ns", get(get_e2n_txs))
.layer(cors)
.with_state(app_state);
let listener = tokio::net::TcpListener::bind(&addr).await.unwrap();
Expand Down

0 comments on commit 9e81298

Please sign in to comment.