Files
cim_summary/backend
admin 301d0bf159 feat(03-01): add requireAdminEmail middleware and getAnalyticsSummary function
- requireAdmin.ts: returns 404 (not 403) for non-admin users per locked decision
- Reads env vars inside function body to avoid Firebase Secrets timing issue
- Fails closed if neither ADMIN_EMAIL nor EMAIL_WEEKLY_RECIPIENT configured
- analyticsService.ts: adds AnalyticsSummary interface and getAnalyticsSummary()
- Uses getPostgresPool() for aggregate SQL (COUNT/AVG not supported by Supabase JS)
- Parameterized interval with $1::interval cast for PostgreSQL compatibility
2026-02-24 15:43:53 -05:00
..
2025-07-30 22:02:17 -04:00
2025-07-30 22:02:17 -04:00