mirror of
https://github.com/Rain-kl/OpenFlare.git
synced 2026-10-01 22:46:38 +08:00
[优化] response 结构调整
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package controller
|
||||
|
||||
import (
|
||||
"openflare/common/response"
|
||||
"openflare/service"
|
||||
|
||||
"github.com/gin-gonic/gin"
|
||||
@@ -40,10 +41,10 @@ type dashboardTrendsPayload struct {
|
||||
func GetDashboardOverview(c *gin.Context) {
|
||||
view, err := service.GetDashboardOverview()
|
||||
if err != nil {
|
||||
respondFailure(c, err.Error())
|
||||
response.RespondFailure(c, err.Error())
|
||||
return
|
||||
}
|
||||
respondSuccess(c, compressDashboardOverview(view))
|
||||
response.RespondSuccess(c, compressDashboardOverview(view))
|
||||
}
|
||||
|
||||
func compressDashboardOverview(view *service.DashboardOverviewView) *dashboardOverviewPayload {
|
||||
|
||||
Reference in New Issue
Block a user