Enhance smoking tracking API and documentation

- Updated the main.go file to set the local time zone to Asia/Shanghai.
- Changed API endpoints from `PUT` to `POST` for user profile and logs management in multiple documentation files to reflect the correct usage.
- Added new fields in the API response for home summary, including `last_smoke_at`, `today_count`, `resisted_count`, and `reduced_from_yesterday`.
- Enhanced documentation across various files to accurately describe the updated API endpoints and their expected behaviors.
This commit is contained in:
nepiedg
2026-01-25 07:55:32 +00:00
parent be6d579d41
commit b67dc32369
12 changed files with 758 additions and 37 deletions
+1 -2
View File
@@ -37,7 +37,7 @@ sequenceDiagram
API->>DB: 查询 fa_smoke_user_profile(uid)
API-->>MP: exists/is_completed/baseline_interval_minutes/作息等
alt 需要补全
MP->>API: PUT /api/v1/smoke/profile {...基础烟量/动机/动力/作息...}
MP->>API: POST /api/v1/smoke/profile {...基础烟量/动机/动力/作息...}
API->>DB: upsert fa_smoke_user_profile(uid)
API-->>MP: 返回最新 profile + baseline_interval_minutes
end
@@ -141,4 +141,3 @@ sequenceDiagram
end
end
```