Commit Graph

4 Commits

Author SHA1 Message Date
Bas van Rossem
974ecb120d feat(api): server-authoritative pause/resume + worked-time stop + CSV paused
Add user-scoped POST /api/sessions/:id/pause and /resume endpoints,
mirroring the stop handler's ownership/lookup and 401/404/409 guards.
Pause sets paused_at (status stays active); resume folds the open span
into paused_seconds and clears paused_at.

Change stop to fold any open pause span into paused_seconds, then set
duration_seconds = max(0, round((end-start)/1000) - paused_seconds) so
saved duration is worked time, and clear paused_at.

Add a "Paused Duration" column to /api/export (after "Total Duration")
using formatDuration(paused_seconds).

Products affected: SoleLog backend (apps/api)
2026-06-17 20:54:42 +02:00
Bas van Rossem
f6bd8eb036 test(api): centralize auth helpers on server-side createUser 2026-06-17 17:29:46 +02:00
Bas van Rossem
b067bb65b0 feat(api): session history and active-session recovery endpoints 2026-06-17 15:45:08 +02:00
Bas van Rossem
940b06fd91 feat(api): server-authoritative session start/stop/discard with ownership scoping 2026-06-17 15:40:07 +02:00