Skip to content

Commit

Permalink
match plausible stats api
Browse files Browse the repository at this point in the history
  • Loading branch information
gernest committed Feb 8, 2024
1 parent 89ff038 commit edee490
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions api/api.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,15 @@ func New(ctx context.Context, o *v1.Config) (*API, error) {
}
request.Write(r.Context(), w, &v1.GetDomainResponse{Domains: o})
return
case "/api/v1/visitors":
case "/api/v1/stats/realtime/visitors":
stats.Realtime(w, r)
return
case "/api/v1/stats/aggregate":
stats.Aggregate(w, r)
return
case "/api/v1/stats/timeseries":
stats.TimeSeries(w, r)
return
default:
if strings.HasPrefix(r.URL.Path, "/js/") {
trackerServer.ServeHTTP(w, r)
Expand All @@ -66,12 +72,6 @@ func New(ctx context.Context, o *v1.Config) (*API, error) {
case "/api/v1/event":
SendEvent(w, r)
return
case "/api/v1/aggregate":
stats.Aggregate(w, r)
return
case "/api/v1/timeseries":
stats.TimeSeries(w, r)
return
case "/api/event":
ReceiveEvent(w, r)
return
Expand Down

0 comments on commit edee490

Please sign in to comment.