feat: add sent report history lookup

This commit is contained in:
nyan404 committed 2026-10-18 18:56:23 +03:00
1 parent 546fa37fce
commit 3ebab303a5
12 files changed
+393 -18

No files matched your search

+1
View File
@@ -22,6 +22,7 @@
- For k3s changes, validate YAML and current cluster inventory first; keep `KUBE_CONFIG_B64` masked/protected in GitLab.
- Do not add unnecessary local build artifacts or temporary files to the repository.
- Admin report UI changes should cover both the persisted history flag and browser behavior: run the focused history/admin filter tests, Python compilation, `git diff --check`, and a JavaScript syntax check for `web/admin.html`. The report list defaults to the calendar current month; do not silently replace the existing sort order.
- Public report lookup is `GET /api/reports?character_id=<cat ID>`; it searches saved report participant IDs, returns at most 100 newest rows without `actor_id`, and is covered by `tests/test_report_lookup.py`. VK `/мои-отчёты` uses the callback sender ID and the same history store; validate with `python -m unittest tests.test_report_lookup tests.test_history tests.test_vk_bot -q`.
## Notes
- VK scheduler lives in `app/belki/vk_scheduler.py`; use `BELKI_DATABASE_URL` in production and `BELKI_HISTORY_DB` for local SQLite checks. Keep mailing disabled until an administrator explicitly enables a conversation and schedule.