Files
ai-agent/internal/controllers/dashboard/dashboard_controller.go
T
mlogclub e9d2e41f9e Refactor controllers to use httpx for JSON responses and eliminate context dependency
- Updated TagController methods to use httpx.WriteJSON for consistent JSON response handling.
- Refactored TicketController to replace context-dependent methods with standalone functions using httpx.
- Modified UserController to utilize httpx for error handling and response formatting.
- Adjusted WechatController to remove context dependency and standardize response handling.
2026-05-23 22:22:18 +08:00

17 lines
332 B
Go

package dashboard
import (
"cs-agent/internal/pkg/httpx"
"cs-agent/internal/services"
"cs-agent/internal/pkg/httpx/params"
"github.com/gin-gonic/gin"
)
func DashboardGetOverview(ctx *gin.Context) {
rangeValue, _ := params.Get(ctx, "range")
httpx.WriteJSON(ctx, services.DashboardService.GetOverview(rangeValue))
return
}