Files
Go-Web-Template/server/api/v1/admin/dashboard.go
2026-04-23 15:29:07 +08:00

23 lines
653 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package admin
import (
"git.echol.cn/loser/Go-Web-Template/server/model/admin"
"git.echol.cn/loser/Go-Web-Template/server/model/common/response"
"github.com/gin-gonic/gin"
)
type DashboardApi struct{}
// GetDashboardStats 运营仪表盘聚合统计(占位实现,避免前端 404后续可接真实聚合查询
func (a *DashboardApi) GetDashboardStats(c *gin.Context) {
stats := admin.DashboardStats{
Feedback: admin.DashboardFeedbackStats{
PendingItems: []admin.DashboardFeedbackPendingItem{},
},
Creators: admin.DashboardCreatorStats{
TopCreators: []admin.DashboardTopCreator{},
},
}
response.OkWithData(stats, c)
}