mclang / kiho-wt-puncher

Rust CLI app to make Kiho worktime login/logout punches using Kiho API
GNU General Public License v3.0
1 stars 0 forks source link

Start/Stop: Thow an error if started/stoppen already #10

Open mclang opened 2 months ago

mclang commented 2 months ago

Problem

Currently it is possible to run both start and stop many times in a row, which might make the lines on server side messy.

Solution

Add checking logic which throws an error if some task is already started or if there is nothing to stop.

How to keep track of the latest line - is local cache, e.g SQLite needed?

Related if done using API calls: #13