Skip to content

Commit 2c0eb46

Browse files
authored
f(IL): add testnet endpoint (#46)
1 parent faa0405 commit 2c0eb46

File tree

1 file changed

+13
-0
lines changed
  • cmd/injective-price-oracle

1 file changed

+13
-0
lines changed

cmd/injective-price-oracle/api.go

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import (
1515
api_health_rpc "github.com/InjectiveLabs/injective-price-oracle/api/gen/grpc/health/pb"
1616
api_health "github.com/InjectiveLabs/injective-price-oracle/api/gen/grpc/health/server"
1717
api_health_service "github.com/InjectiveLabs/injective-price-oracle/api/gen/health"
18+
api_health_http_server "github.com/InjectiveLabs/injective-price-oracle/api/gen/http/health/server"
1819
api_http_server "github.com/InjectiveLabs/injective-price-oracle/api/gen/http/injective_price_oracle_api/server"
1920
swaggerHTTPServer "github.com/InjectiveLabs/injective-price-oracle/api/gen/http/swagger/server"
2021
api_server_service "github.com/InjectiveLabs/injective-price-oracle/api/gen/injective_price_oracle_api"
@@ -103,6 +104,18 @@ func apiCmd(cmd *cli.Cmd) {
103104

104105
api_health_rpc.RegisterHealthServer(grpcServer, grpcHealthRouter)
105106

107+
// http health api
108+
healthHTTPRouter := api_health_http_server.New(
109+
api_health_service.NewEndpoints(healthSvc),
110+
grpcWebMux,
111+
goahttp.RequestDecoder,
112+
goahttp.ResponseEncoder,
113+
newErrorHandler(log.DefaultLogger),
114+
nil,
115+
)
116+
117+
api_health_http_server.Mount(grpcWebMux, healthHTTPRouter)
118+
106119
// http api
107120
apiRouter := api_http_server.New(
108121
api_server_service.NewEndpoints(apiSvc),

0 commit comments

Comments
 (0)