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:
@@ -168,7 +168,6 @@ func (s *SmokeProfileService) Upsert(ctx context.Context, uid int, req UpsertSmo
|
||||
func isSmokeProfileCompleted(p smokemodel.SmokeUserProfile) bool {
|
||||
return p.BaselineCigsPerDay > 0 &&
|
||||
p.PackPriceCent > 0 &&
|
||||
len(p.SmokeMotivations) > 0 &&
|
||||
len(p.QuitMotivations) > 0 &&
|
||||
strings.TrimSpace(p.WakeUpTime) != "" &&
|
||||
strings.TrimSpace(p.SleepTime) != ""
|
||||
|
||||
Reference in New Issue
Block a user