mitai-jinkendo/backend
Lars 1db780858b fix: align all API endpoints between frontend and backend
Fixed 11 critical endpoint mismatches found during codebase audit.

**Renamed Endpoints (consistency):**
- /api/ai/analyze/{slug} → /api/insights/run/{slug}
- /api/ai/analyze-pipeline → /api/insights/pipeline
- /api/auth/password-reset-request → /api/auth/forgot-password
- /api/auth/password-reset-confirm → /api/auth/reset-password
- /api/admin/test-email → /api/admin/email/test

**Added Missing Endpoints:**
- POST /api/auth/pin (change PIN/password for current user)
- PUT /api/admin/profiles/{id}/permissions (set permissions)
- PUT /api/admin/profiles/{id}/email (set email)
- PUT /api/admin/profiles/{id}/pin (admin set PIN)
- GET /api/admin/email/status (check SMTP config)
- PUT /api/prompts/{id} (edit prompt templates, admin only)
- GET /api/export/json (export all data as JSON)
- GET /api/export/zip (export data + photos as ZIP)

**Updated:**
- Added imports: json, zipfile, Response
- Fixed admin email test endpoint to accept dict body

All frontend API calls now have matching backend implementations.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-18 17:07:41 +01:00
..
db_init.py fix: actually call migration function (was only importing) 2026-03-18 12:19:51 +01:00
db.py 9b 2026-03-18 08:27:33 +01:00
Dockerfile fix: replace psql with Python for DB checks (no apt-get needed!) 2026-03-18 10:01:19 +01:00
main.py fix: align all API endpoints between frontend and backend 2026-03-18 17:07:41 +01:00
migrate_to_postgres.py fix: convert empty date strings to NULL in migration 2026-03-18 12:32:34 +01:00
requirements.txt 9b 2026-03-18 08:27:33 +01:00
schema.sql fix: add missing meas_id column to photos table 2026-03-18 12:23:13 +01:00
startup.sh fix: replace psql with Python for DB checks (no apt-get needed!) 2026-03-18 10:01:19 +01:00