fix(仪表盘): 增加对数据库驱动和仓储实例的有效性检查
This commit is contained in:
@@ -85,6 +85,9 @@ func NewDashboardService(usageRepo UsageLogRepository, aggRepo DashboardAggregat
|
||||
aggUsageDays = cfg.DashboardAgg.Retention.UsageLogsDays
|
||||
}
|
||||
}
|
||||
if aggRepo == nil {
|
||||
aggEnabled = false
|
||||
}
|
||||
return &DashboardService{
|
||||
usageRepo: usageRepo,
|
||||
aggRepo: aggRepo,
|
||||
|
||||
Reference in New Issue
Block a user