feat: Enhance activity log handling and session metrics synchronization
- Added a new function to synchronize session metrics with activity log entries, ensuring data consistency. - Updated the create and update activity endpoints to call the synchronization function after inserting or modifying activity logs. - Introduced a set of allowed keys for activity log payloads to streamline data handling in the frontend. - Improved data coercion logic for various data types in the frontend to ensure accurate data submission.
This commit is contained in:
1 parent
db9952525a
commit
3296dfca28
4 files changed
+174
-14
No files matched your search
@@ -340,7 +340,7 @@ export const api = {
|
||||
|
||||
getActivitySession: (id) => req(`/activity/${encodeURIComponent(id)}`),
|
||||
putActivityMetrics: (id, body) =>
|
||||
req(`/activity/${encodeURIComponent(id)}/metrics`, json(body)),
|
||||
req(`/activity/${encodeURIComponent(id)}/metrics`, jput(body)),
|
||||
|
||||
// Sleep Module (v9d Phase 2b)
|
||||
listSleep: (l=90) => req(`/sleep?limit=${l}`),
|
||||
|
||||
Reference in new issue
Block a user