Skip to content
Snippets Groups Projects
Commit 54866b13 authored by Hans Moog's avatar Hans Moog
Browse files

Refactor: uncommented broken code

parent 49b59250
No related branches found
No related tags found
No related merge requests found
package getTransactionObjectsByHash
import (
"fmt"
"net/http"
"github.com/iotaledger/goshimmer/plugins/webapi"
"github.com/iotaledger/hive.go/logger"
"github.com/iotaledger/hive.go/node"
"github.com/iotaledger/iota.go/trinary"
"github.com/labstack/echo"
"github.com/iotaledger/goshimmer/plugins/webapi"
)
var PLUGIN = node.NewPlugin("WebAPI getTransactionObjectsByHash Endpoint", node.Enabled, configure)
......@@ -34,7 +34,7 @@ func getTransactionObjectsByHash(c echo.Context) error {
}
log.Debug("Received:", request.Hashes)
/*
for _, hash := range request.Hashes {
tx, err := tangle_old.GetTransaction(hash)
if err != nil {
......@@ -58,6 +58,7 @@ func getTransactionObjectsByHash(c echo.Context) error {
}
result = append(result, t)
}
*/
return c.JSON(http.StatusOK, Response{Transactions: result})
}
......
package getTransactionTrytesByHash
import (
"fmt"
"net/http"
"github.com/iotaledger/goshimmer/plugins/webapi"
"github.com/iotaledger/hive.go/logger"
"github.com/iotaledger/hive.go/node"
"github.com/iotaledger/iota.go/trinary"
"github.com/labstack/echo"
"github.com/iotaledger/goshimmer/plugins/webapi"
)
var PLUGIN = node.NewPlugin("WebAPI getTransactionTrytesByHash Endpoint", node.Enabled, configure)
......@@ -33,6 +33,7 @@ func getTransactionTrytesByHash(c echo.Context) error {
}
log.Debug("Received:", request.Hashes)
/*
for _, hash := range request.Hashes {
tx, err := tangle_old.GetTransaction(hash)
if err != nil {
......@@ -44,6 +45,7 @@ func getTransactionTrytesByHash(c echo.Context) error {
trytes := trinary.MustTritsToTrytes(tx.GetTrits())
result = append(result, trytes)
}
*/
return c.JSON(http.StatusOK, Response{Trytes: result})
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment