Include completion_summary in my-residences list endpoint
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user