feat: the dashboard page is ready for admin console

This commit is contained in:
RockYang
2023-08-02 16:37:47 +08:00
parent 3529649ba9
commit b09d23f97f
7 changed files with 214 additions and 32 deletions

View File

@@ -141,6 +141,7 @@ func main() {
fx.Provide(admin.NewUserHandler),
fx.Provide(admin.NewChatRoleHandler),
fx.Provide(admin.NewRewardHandler),
fx.Provide(admin.NewDashboardHandler),
// 创建服务
fx.Provide(service.NewAliYunSmsService),
@@ -231,6 +232,10 @@ func main() {
group := s.Engine.Group("/api/admin/reward/")
group.GET("list", h.List)
}),
fx.Invoke(func(s *core.AppServer, h *admin.DashboardHandler) {
group := s.Engine.Group("/api/admin/dashboard/")
group.GET("stats", h.Stats)
}),
fx.Invoke(func(s *core.AppServer, db *gorm.DB) {
err := s.Run(db)