fix: resolve all P0/P1 code quality issues
Some checks failed
CI / test (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Security Scan / backend-security (push) Has been cancelled
Security Scan / frontend-security (push) Has been cancelled

P0 fixes:
- P0-01: sticky_session_test.go add context import
- P0-02: wire_gen.go add usageLogRepository parameter
- P0-03: admin_service_stub_test.go add GetGroupAPIKeyCount
- P0-04: admin_basic_handlers_test.go add stubUsageLogRepository

P1 fixes:
- P1-03: group_handler.go GetStats implement real data query

E2E fixes:
- Fix API Key path to /api/v1/keys (user endpoint)

Documentation:
- Update MEMORY.md with latest fixes
This commit is contained in:
Developer
2026-04-03 12:54:16 +08:00
parent 4bf838105b
commit 4d71566c0d
9 changed files with 224 additions and 34 deletions

View File

@@ -70,6 +70,16 @@ func ProvideSettingHandler(settingService *service.SettingService, buildInfo Bui
return NewSettingHandler(settingService, buildInfo.Version)
}
// ProvideGroupHandler creates GroupHandler with all dependencies
func ProvideGroupHandler(
adminService service.AdminService,
dashboardService *service.DashboardService,
groupCapacityService *service.GroupCapacityService,
usageLogRepo service.UsageLogRepository,
) *admin.GroupHandler {
return admin.NewGroupHandler(adminService, dashboardService, groupCapacityService, usageLogRepo)
}
// ProvideHandlers creates the Handlers struct
func ProvideHandlers(
authHandler *AuthHandler,
@@ -126,7 +136,7 @@ var ProviderSet = wire.NewSet(
// Admin handlers
admin.NewDashboardHandler,
admin.NewUserHandler,
admin.NewGroupHandler,
ProvideGroupHandler,
admin.NewAccountHandler,
admin.NewAnnouncementHandler,
admin.NewDataManagementHandler,