Skip to content

Commit

Permalink
Merge pull request #86 from SiaFoundation/fix-jape
Browse files Browse the repository at this point in the history
Fix jape
  • Loading branch information
n8maninger authored Sep 13, 2024
2 parents c3a7931 + 69a589e commit ed35617
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,3 +11,15 @@ env:
jobs:
test:
uses: SiaFoundation/workflows/.github/workflows/go-test.yml@master
analyze:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Jape Analyzer
uses: SiaFoundation/action-golang-analysis@HEAD
with:
analyzers: |
go.sia.tech/jape.Analyzer@master
directories: |
api
5 changes: 2 additions & 3 deletions api/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import (

"go.sia.tech/core/consensus"
"go.sia.tech/core/types"
"go.sia.tech/coreutils/syncer"
"go.sia.tech/explored/explorer"
"go.sia.tech/jape"
)
Expand Down Expand Up @@ -58,7 +57,7 @@ func (c *Client) SyncerConnect(addr string) (err error) {
}

// SyncerPeers returns the peers of the syncer.
func (c *Client) SyncerPeers() (resp []*syncer.Peer, err error) {
func (c *Client) SyncerPeers() (resp []string, err error) {
err = c.c.GET("/syncer/peers", &resp)
return
}
Expand Down Expand Up @@ -211,6 +210,6 @@ func (c *Client) HostMetrics() (resp explorer.HostMetrics, err error) {

// Search returns what type of object an ID is.
func (c *Client) Search(id types.Hash256) (resp explorer.SearchType, err error) {
err = c.c.GET(fmt.Sprintf("/search/%s", id), &resp)
err = c.c.GET(fmt.Sprintf("/search/%s", id.String()), &resp)
return
}

0 comments on commit ed35617

Please sign in to comment.