mirror of
https://github.com/chaitin/MonkeyCode.git
synced 2026-02-05 00:04:50 +08:00
fix: 管理员活跃时间记录
This commit is contained in:
@@ -15,11 +15,12 @@ func NewDashboardHandler(
|
||||
w *web.Web,
|
||||
usecase domain.DashboardUsecase,
|
||||
auth *middleware.AuthMiddleware,
|
||||
active *middleware.ActiveMiddleware,
|
||||
) *DashboardHandler {
|
||||
h := &DashboardHandler{usecase: usecase}
|
||||
|
||||
g := w.Group("/api/v1/dashboard")
|
||||
g.Use(auth.Auth())
|
||||
g.Use(auth.Auth(), active.Active("admin"))
|
||||
g.GET("/statistics", web.BaseHandler(h.Statistics))
|
||||
g.GET("/category-stat", web.BindHandler(h.CategoryStat))
|
||||
g.GET("/time-stat", web.BindHandler(h.TimeStat))
|
||||
|
||||
Reference in New Issue
Block a user