hackclub / hack-hour

Every Hour = More Power. Keep track of each hour of work you get done on your project.
https://hackhour.hackclub.com
12 stars 15 forks source link

`/api/clock/:slackId` returns incorrect time for sessions with pauses #74

Closed samdev-7 closed 6 days ago

samdev-7 commented 6 days ago

The endpoint /api/clock/:slackId considers the start time + duration as the end time and ignores pauses in the session. Relavent code

This results in lower than actual values being returned, sometimes into the negatives, for sessions that have previously been paused.

techpixel commented 6 days ago

Solved with new /api/session/:slackId endpoint in #76. The old /api/clock/:slackId endpoint is depreciated.