🎨 Rework UI to show queued blocks

This commit is contained in:
Ettore Di Giacinto
2021-11-01 21:07:34 +01:00
parent cb19a365f3
commit e36f3d7cf2
3 changed files with 38 additions and 30 deletions

View File

@@ -84,9 +84,9 @@ func API(l string, ledger *blockchain.Ledger) error {
ec.GET("/*", echo.WrapHandler(http.StripPrefix("/", assetHandler)))
// ec.GET("/api/blockchain", func(c echo.Context) error {
// return c.JSON(http.StatusOK, ledger.BlockChain())
// })
ec.GET("/api/blockchain", func(c echo.Context) error {
return c.JSON(http.StatusOK, ledger.LastBlock())
})
ec.GET("/api/ledger", func(c echo.Context) error {
return c.JSON(http.StatusOK, ledger.CurrentData())