refactor: 对齐后端样例工程规范
This commit is contained in:
18
backend/api/internal/logic/dashboard/dashboard.go
Normal file
18
backend/api/internal/logic/dashboard/dashboard.go
Normal file
@@ -0,0 +1,18 @@
|
||||
// Package dashboard 提供平台总后台聚合指标。
|
||||
package dashboard
|
||||
|
||||
import (
|
||||
"git.apinb.com/bsm-sdk/core/infra"
|
||||
"git.apinb.com/heqiapp/platforms/backend/api/internal/models"
|
||||
"github.com/gin-gonic/gin"
|
||||
)
|
||||
|
||||
// Overview 返回组织与安全运营的首期概览数据。
|
||||
func Overview(ctx *gin.Context) {
|
||||
overview, err := models.GetDashboardOverview()
|
||||
if err != nil {
|
||||
infra.Response.Error(ctx, err)
|
||||
return
|
||||
}
|
||||
infra.Response.Success(ctx, overview)
|
||||
}
|
||||
Reference in New Issue
Block a user