Skip to content

Commit

Permalink
Merge branch 'master' of github.com:celenium-io/celestia-indexer into…
Browse files Browse the repository at this point in the history
… CLS-107-add-msgs-and-events-from-cosmos
  • Loading branch information
vvuwei committed Oct 28, 2023
2 parents f0d524b + 0402f0b commit caeb950
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 2 deletions.
24 changes: 24 additions & 0 deletions .run/requests/block.http
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
### Get blocks list
http://{{host}}/v1/block

### Get blocks count
http://{{host}}/v1/block/count

### Get genesis block
http://{{host}}/v1/block/0

### Get block by height
http://{{host}}/v1/block/12

### Get block events
http://{{host}}/v1/block/20345/events

### Get block stats
http://{{host}}/v1/block/20345/stats

### Get block namespaces
http://{{host}}/v1/block/20345/namespace

### Get block namespaces count
http://{{host}}/v1/block/20345/namespace/count

4 changes: 2 additions & 2 deletions cmd/api/handler/block.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,11 @@ func NewBlockHandler(
}

type getBlockByHeightRequest struct {
Height types.Level `param:"height" validate:"required,min=0"`
Height types.Level `param:"height" validate:"min=0"`
}

type getBlockRequest struct {
Height types.Level `param:"height" validate:"required,min=0"`
Height types.Level `param:"height" validate:"min=0"`

Stats bool `query:"stats" validate:"omitempty"`
}
Expand Down

0 comments on commit caeb950

Please sign in to comment.