chore: update server structure

This commit is contained in:
Steven
2023-10-17 21:54:22 +08:00
parent 328397612c
commit 3225e7c47b
10 changed files with 76 additions and 2 deletions

View File

@@ -10,6 +10,7 @@ import (
"github.com/mssola/useragent"
"golang.org/x/exp/slices"
"github.com/boojack/slash/server/metric"
"github.com/boojack/slash/store"
)
@@ -78,6 +79,7 @@ func (s *APIV1Service) registerAnalyticsRoutes(g *echo.Group) {
browserMap[browserName]++
}
metric.Enqueue("shortcut analytics")
return c.JSON(http.StatusOK, &AnalysisData{
ReferenceData: mapToReferenceInfoSlice(referenceMap),
DeviceData: mapToDeviceInfoSlice(deviceMap),