fiz: correções da pool

This commit is contained in:
Júnior
2025-06-17 18:26:14 -03:00
parent 682027d517
commit 9259f36e9c
31 changed files with 373 additions and 269 deletions

View File

@ -1,21 +1,19 @@
package api
import (
"github.com/gorilla/mux"
"net/http"
"dejo_node/internal/ws"
"net/http"
"github.com/gorilla/mux"
)
func NewServer(handler *Handler) http.Handler {
r := mux.NewRouter()
// ⚠️ Endpoints removidos temporariamente pois ainda não foram implementados
// r.HandleFunc("/block/latest", handler.GetLatestBlock).Methods("GET")
// r.HandleFunc("/block/{index}", handler.GetBlockByIndex).Methods("GET")
// r.HandleFunc("/tx/{hash}", handler.GetTransactionByHash).Methods("GET")
// r.HandleFunc("/tx", handler.PostTransaction).Methods("POST")
// r.HandleFunc("/oracle/{key}", handler.GetOracleValue).Methods("GET")
// Endpoints básicos
r.HandleFunc("/ping", handler.Ping).Methods("GET")
r.HandleFunc("/consensus", handler.HandleConsensus).Methods("POST")
r.HandleFunc("/ws", ws.HandleWS).Methods("GET")
return r
}
}