Skip to content

Commit

Permalink
temp renaming of new api path
Browse files Browse the repository at this point in the history
  • Loading branch information
badgersrus committed Apr 11, 2024
1 parent f9871d0 commit 330e59d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion integration/tenscan/tenscan_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ func TestTenscan(t *testing.T) {
// check "hash" field is included in json response
assert.Contains(t, string(body), "\"hash\"")

statusCode, body, err = fasthttp.Get(nil, fmt.Sprintf("%s/items/batchs/?offset=0&size=10", serverAddress))
statusCode, body, err = fasthttp.Get(nil, fmt.Sprintf("%s/items/new/batches/?offset=0&size=10", serverAddress))
assert.NoError(t, err)
assert.Equal(t, 200, statusCode)

Expand Down
3 changes: 2 additions & 1 deletion tools/tenscan/backend/webserver/webserver_routes_items.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ func routeItems(r *gin.Engine, server *WebServer) {
r.GET("/items/rollup/latest/", server.getLatestRollupHeader)
r.GET("/items/rollups/", server.getRollupListing) // New
r.GET("/items/batches/", server.getBatchListingDeprecated)
r.GET("/items/new/batches/", server.getBatchListingNew)
r.GET("/items/blocks/", server.getBlockListing) // Deprecated
r.GET("/items/transactions/", server.getPublicTransactions)
r.GET("/info/obscuro/", server.getConfig)
Expand Down Expand Up @@ -109,7 +110,7 @@ func (w *WebServer) getPublicTransactions(c *gin.Context) {
c.JSON(http.StatusOK, gin.H{"result": publicTxs})
}

func (w *WebServer) getBatchListing(c *gin.Context) {
func (w *WebServer) getBatchListingNew(c *gin.Context) {
offsetStr := c.DefaultQuery("offset", "0")
sizeStr := c.DefaultQuery("size", "10")

Expand Down

0 comments on commit 330e59d

Please sign in to comment.