Include completion_summary in my-residences list endpoint

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Trey t
2026-03-12 00:14:24 -05:00
parent 6803f6ec18
commit 3b86d0aae1

View File

@@ -132,6 +132,16 @@ func (s *ResidenceService) GetMyResidences(userID uint, now time.Time) (*respons
} }
} }
} }
// Attach completion summaries (honeycomb grid data)
for i := range residenceResponses {
summary, err := s.taskRepo.GetCompletionSummary(residenceResponses[i].ID, now, 10)
if err != nil {
log.Warn().Err(err).Uint("residence_id", residenceResponses[i].ID).Msg("Failed to fetch completion summary")
continue
}
residenceResponses[i].CompletionSummary = summary
}
} }
return &responses.MyResidencesResponse{ return &responses.MyResidencesResponse{