Skip to content

Commit

Permalink
update visitors call
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Feb 10, 2024
1 parent 7593bf6 commit bbe83c0
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tools/curl/curl_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ func TestVersion(t *testing.T) {
check(t, false, "version.sh", "/api/v1/version", http.MethodGet, nil, nil)
}
func TestVisitors(t *testing.T) {
check(t, true, "visitors.sh", "/api/v1/visitors"+siteId, http.MethodGet, nil, nil)
check(t, true, "visitors.sh", "/api/v1/stats/realtime/visitors"+siteId, http.MethodGet, nil, nil)
}

func check(t *testing.T, write bool, file string, path, method string, headers http.Header, body proto.Message) {
Expand Down
2 changes: 1 addition & 1 deletion tools/curl/testdata/visitors.sh
Original file line number Diff line number Diff line change
@@ -1 +1 @@
curl -X 'GET' 'http://localhost:8080/api/v1/visitors?site_id=vinceanalytics.com'
curl -X 'GET' 'http://localhost:8080/api/v1/stats/realtime/visitors?site_id=vinceanalytics.com'
1 change: 1 addition & 0 deletions tools/visitors
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bash ./tools/curl/testdata/visitors.sh

0 comments on commit bbe83c0

Please sign in to comment.