Cloudreve/routers/controllers/admin.go

18 lines
361 B
Go
Raw Normal View History

2020-02-22 16:22:04 +08:00
package controllers
import (
"github.com/HFO4/cloudreve/service/admin"
"github.com/gin-gonic/gin"
)
// AdminSummary 获取管理站点概况
func AdminSummary(c *gin.Context) {
var service admin.NoParamService
if err := c.ShouldBindUri(&service); err == nil {
res := service.Summary()
c.JSON(200, res)
} else {
c.JSON(200, ErrorResponse(err))
}
}