From 791fff066fe2a6141929e7c363e1a6151c9e1bd2 Mon Sep 17 00:00:00 2001 From: romever <360876221@qq.com> Date: Mon, 30 Sep 2024 20:40:54 +0800 Subject: [PATCH] add /network/status api --- api/internal/handler/routes.go | 7 +++++++ api/oasisscan.api | 14 +++++++------- 2 files changed, 14 insertions(+), 7 deletions(-) diff --git a/api/internal/handler/routes.go b/api/internal/handler/routes.go index afeee0e..b826e04 100644 --- a/api/internal/handler/routes.go +++ b/api/internal/handler/routes.go @@ -60,6 +60,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: account.AccountStakingEventsInfoHandler(serverCtx), }, }, + rest.WithPrefix("/v2"), ) server.AddRoutes( @@ -95,6 +96,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: chain.ChainTransactionsHandler(serverCtx), }, }, + rest.WithPrefix("/v2"), ) server.AddRoutes( @@ -115,6 +117,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: common.NetworkTrendHandler(serverCtx), }, }, + rest.WithPrefix("/v2"), ) server.AddRoutes( @@ -135,6 +138,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: governance.GovernanceVotesHandler(serverCtx), }, }, + rest.WithPrefix("/v2"), ) server.AddRoutes( @@ -150,6 +154,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: market.MarketInfoHandler(serverCtx), }, }, + rest.WithPrefix("/v2"), ) server.AddRoutes( @@ -185,6 +190,7 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: runtime.RuntimeTransactionListHandler(serverCtx), }, }, + rest.WithPrefix("/v2"), ) server.AddRoutes( @@ -220,5 +226,6 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) { Handler: validator.ValidatorSignStatsHandler(serverCtx), }, }, + rest.WithPrefix("/v2"), ) } diff --git a/api/oasisscan.api b/api/oasisscan.api index 4729be5..61f969c 100644 --- a/api/oasisscan.api +++ b/api/oasisscan.api @@ -554,7 +554,7 @@ type ( @server ( prefix: /v2 - group: common + group: common ) service oasisscan-api { @handler HealthHandler @@ -569,7 +569,7 @@ service oasisscan-api { @server ( prefix: /v2 - group: validator + group: validator ) service oasisscan-api { @handler ValidatorListHandler @@ -593,7 +593,7 @@ service oasisscan-api { @server ( prefix: /v2 - group: account + group: account ) service oasisscan-api { @handler AccountRewardHandler @@ -623,7 +623,7 @@ service oasisscan-api { @server ( prefix: /v2 - group: chain + group: chain ) service oasisscan-api { @handler ChainTransactionInfoHandler @@ -647,7 +647,7 @@ service oasisscan-api { @server ( prefix: /v2 - group: runtime + group: runtime ) service oasisscan-api { @handler RuntimeListHandler @@ -671,7 +671,7 @@ service oasisscan-api { @server ( prefix: /v2 - group: market + group: market ) service oasisscan-api { @handler MarketChartHandler @@ -683,7 +683,7 @@ service oasisscan-api { @server ( prefix: /v2 - group: governance + group: governance ) service oasisscan-api { @handler GovernanceProposalListHandler