Skip to content

Commit

Permalink
Fix: search addresses (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
aopoltorzhicky authored Nov 5, 2024
1 parent a74e8a4 commit 928ba27
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions cmd/api/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -262,15 +262,15 @@ func initHandlers(ctx context.Context, e *echo.Echo, cfg Config, db postgres.Sto
v1.GET("/constants", constantsHandler.Get)
v1.GET("/enums", constantsHandler.Enums)

searchHandler := handler.NewSearchHandler(constantCache, db.Search, db.Address, db.Blocks, db.Tx, db.Rollup, db.Bridges, db.Validator)
v1.GET("/search", searchHandler.Search)

constantObserver := dispatcher.Observe(storage.ChannelConstant)
constantCache = cache.NewConstantsCache(constantObserver)
if err := constantCache.Start(ctx, db.Constants); err != nil {
panic(err)
}

searchHandler := handler.NewSearchHandler(constantCache, db.Search, db.Address, db.Blocks, db.Tx, db.Rollup, db.Bridges, db.Validator)
v1.GET("/search", searchHandler.Search)

addressHandler := handler.NewAddressHandler(constantCache, db.Address, db.Tx, db.Action, db.Rollup, db.Fee, db.Bridges, db.Deposit, db.State, cfg.Indexer.Name)
addressesGroup := v1.Group("/address")
{
Expand Down

0 comments on commit 928ba27

Please sign in to comment.