Improve handling in POST /api/meditation
- When amount walking/sitting > 240
- current: set it to 240 minutes and proceed as usual
- update: return 400 code and error message
- reason: unexpected payload change
- When there is already a session
- current: delete the old session, start the new
- update: keep the old session, but set its end date to being ended earlier
- reason: prevent loss of data
- Field for start date
- current: createdAt is used
- update: use new field
- reason: createdAt is meant as metadata field
- Change success payload
- return information if session was logged (and how many) or started live session
- Adjust frontend for logging (see !253 (comment 687105522))
- Add lastMeditation date in user also when logging offline? For correct displaying of active commitments this might be needed.
Edited by Sebastian K