Fix /reports/{report_id} returning 404 - add report detail page and API endpoint

Agent-Logs-Url: https://github.com/christianlouis/dmarq/sessions/4a412936-3bf7-4c02-b121-c0c342c34f1b

Co-authored-by: christianlouis <361235+christianlouis@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2026-03-29 22:18:17 +00:00
parent a918e002be
commit af122881a5
5 changed files with 451 additions and 1 deletions
+16
View File
@@ -147,6 +147,22 @@ class ReportStore:
"""
return self.domain_summary
def get_report_by_id(self, report_id: str) -> Optional[Dict[str, Any]]:
"""
Find a report by its report_id across all domains.
Args:
report_id: Report identifier from the DMARC report metadata
Returns:
The report dictionary if found, None otherwise
"""
for reports in self.domain_reports.values():
for report in reports:
if report.get("report_id") == report_id:
return report
return None
def get_domain_reports(self, domain: str, limit: Optional[int] = None) -> List[Dict[str, Any]]:
"""
Get all reports for a domain