refactor: ai usage statics.
This commit is contained in:
@@ -18,6 +18,7 @@ func SetupRouter() *gin.Engine {
|
||||
userAdminController := controllers.NewUserAdminController()
|
||||
gatewayController := controllers.NewGatewayAdminController()
|
||||
systemDebugController := controllers.NewSystemDebugController()
|
||||
statisticsController := controllers.NewStatisticsController()
|
||||
deviceTokenHandler := func(c *gin.Context) {
|
||||
clientSecret := c.GetHeader("X-API-Key")
|
||||
if clientSecret != middleware.ApiSecret {
|
||||
@@ -85,6 +86,10 @@ func SetupRouter() *gin.Engine {
|
||||
admin.GET("/system-debug/mqtt/status", systemDebugController.MqttStatus)
|
||||
admin.POST("/system-debug/mqtt/start", systemDebugController.StartMqtt)
|
||||
admin.POST("/system-debug/mqtt/stop", systemDebugController.StopMqtt)
|
||||
|
||||
admin.GET("/statistics/ai-analysis-records", statisticsController.ListAIAnalysisRecords)
|
||||
admin.DELETE("/statistics/ai-analysis-records/:id", statisticsController.DeleteAIAnalysisRecord)
|
||||
admin.GET("/statistics/ai-analysis", statisticsController.StatisticsByRegion)
|
||||
}
|
||||
|
||||
v1.GET("/admin/system-debug/mqtt/ws", systemDebugController.MqttWebSocket)
|
||||
|
||||
Reference in New Issue
Block a user