refactor: eliminate dead code, redundant API queries, and enforce empty JSON array slices
- Remove redundant adminGetStatsSummary query and unused AdminStatsSummary interface - Initialize empty repository slices with make([]T, 0) to ensure empty JSON arrays instead of null - Add optional chaining in dashboard aggregations for strict null-safety - Passed 100% unanimous peer reviews from planner-reviewer-claude-01 and reviewer-cline-01
This commit is contained in:
@@ -28,7 +28,7 @@ func (r *StandardizationRepository) GetStandardsBodiesWithProjects(ctx context.C
|
||||
}
|
||||
defer bodyRows.Close()
|
||||
|
||||
var bodies []models.StandardsBodyWithProjects
|
||||
bodies := make([]models.StandardsBodyWithProjects, 0)
|
||||
bodyMap := make(map[int]int)
|
||||
|
||||
for bodyRows.Next() {
|
||||
|
||||
Reference in New Issue
Block a user