mitai-jinkendo/backend/routers
Lars 0278a8e4a6
All checks were successful
Deploy Development / deploy (push) Successful in 50s
Build Test / lint-backend (push) Successful in 0s
Build Test / build-frontend (push) Successful in 13s
fix: photo upload date parameter parsing
Problem: Photos were always getting NULL date instead of form date,
causing frontend to fallback to created timestamp (today).

Root cause: FastAPI requires Form() wrapper for form fields when
mixing with File() parameters. Without it, the date parameter was
treated as query parameter and always received empty string.

Solution:
- Import Form from fastapi
- Change date parameter from str="" to str=Form("")
- Return photo_date instead of date in response (consistency)

Now photos correctly use the date from the upload form and can be
backdated when uploading later.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-22 14:33:01 +01:00
..
__init__.py refactor: modular backend architecture with 14 router modules 2026-03-19 11:15:35 +01:00
access_grants.py feat: add admin management routers for subscription system 2026-03-19 13:09:33 +01:00
activity.py feat: learnable activity type mapping system (DB-based, auto-learning) 2026-03-21 19:31:58 +01:00
admin_activity_mappings.py feat: learnable activity type mapping system (DB-based, auto-learning) 2026-03-21 19:31:58 +01:00
admin_training_types.py feat: admin CRUD for training types + distribution chart in ActivityPage 2026-03-21 15:32:32 +01:00
admin.py refactor: modular backend architecture with 14 router modules 2026-03-19 11:15:35 +01:00
auth.py fix: email verification redirect and already-used token message 2026-03-21 12:28:51 +01:00
caliper.py feat: Phase 4 Batch 1 - enable enforcement for data entries 2026-03-21 06:57:05 +01:00
circumference.py feat: Phase 4 Batch 1 - enable enforcement for data entries 2026-03-21 06:57:05 +01:00
coupons.py feat: add coupon management and redemption 2026-03-19 13:07:09 +01:00
exportdata.py feat: complete Phase 4 enforcement for all features (backend) 2026-03-21 07:40:37 +01:00
features.py fix: prevent connection pool exhaustion in features/usage 2026-03-21 07:02:42 +01:00
importdata.py feat: complete Phase 4 enforcement for all features (backend) 2026-03-21 07:40:37 +01:00
insights.py feat: complete Phase 4 enforcement for all features (backend) 2026-03-21 07:40:37 +01:00
nutrition.py feat: add manual nutrition entry form with auto-detect 2026-03-21 08:37:01 +01:00
photos.py fix: photo upload date parameter parsing 2026-03-22 14:33:01 +01:00
profiles.py refactor: modular backend architecture with 14 router modules 2026-03-19 11:15:35 +01:00
prompts.py refactor: modular backend architecture with 14 router modules 2026-03-19 11:15:35 +01:00
sleep.py feat: sleep duration excludes awake time (actual sleep only) 2026-03-22 14:01:47 +01:00
stats.py refactor: modular backend architecture with 14 router modules 2026-03-19 11:15:35 +01:00
subscription.py feat: add user subscription info endpoints 2026-03-19 13:05:55 +01:00
tier_limits.py fix: show all tiers in admin matrix editor including selfhosted 2026-03-20 06:19:32 +01:00
tiers_mgmt.py feat: add admin management routers for subscription system 2026-03-19 13:09:33 +01:00
training_types.py feat: add extended training types (cardio walk/dance, mind & meditation) 2026-03-21 15:16:07 +01:00
user_restrictions.py feat: add admin management routers for subscription system 2026-03-19 13:09:33 +01:00
weight.py feat: Phase 4 Batch 1 - enable enforcement for data entries 2026-03-21 06:57:05 +01:00