Skip to content

Commit

Permalink
return after handling stats
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Feb 8, 2024
1 parent 844b35b commit a2d12b2
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ func New(ctx context.Context, o *v1.Config) (*API, error) {
return
case "/v1/visitors":
stats.Realtime(w, r)
return
default:
if strings.HasPrefix(r.URL.Path, "/js/") {
trackerServer.ServeHTTP(w, r)
Expand All @@ -60,8 +61,10 @@ func New(ctx context.Context, o *v1.Config) (*API, error) {
return
case "/v1/aggregate":
stats.Aggregate(w, r)
return
case "/v1/timeseries":
stats.TimeSeries(w, r)
return
case "/api/event":
ReceiveEvent(w, r)
return
Expand Down

0 comments on commit a2d12b2

Please sign in to comment.