Skip to content

Commit 5650feb

Browse files
resty api
1 parent 47613d0 commit 5650feb

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

internal/api/docs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ func (c *Client) DocsSearch(ctx context.Context, query string, limit int) (*Docs
4747
span, _ = opentracing.StartSpanFromContext(ctx, "apiclient.DocsSearch")
4848
defer span.Finish()
4949

50-
endpoint := fmt.Sprintf("api/search?q=%s&limit=%d", url.QueryEscape(query), limit)
50+
endpoint := fmt.Sprintf("api/v1/search?query=%s&limit=%d", url.QueryEscape(query), limit)
5151
sURL := docsSearchAPIURL + "/" + endpoint
5252

5353
span.SetTag("request_url", sURL)

internal/api/docs_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ func Test_DocsSearch_QueryEncoding(t *testing.T) {
148148
require.NoError(t, err)
149149

150150
// Verify URL encoding
151-
assert.Contains(t, mockTransport.capturedURL, "q=messages+%26+webhooks")
151+
assert.Contains(t, mockTransport.capturedURL, "query=messages+%26+webhooks")
152152
assert.Contains(t, mockTransport.capturedURL, "limit=5")
153153
}
154154

0 commit comments

Comments
 (0)