improved time table: now updating started time when starting new time track
Build Docker Image / Docker-Build (push) Successful in 2m25s
Build Docker Image / Clean-Registry (push) Failing after 10m18s

Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
2026-06-17 09:14:57 +02:00
parent 4a83bb6bee
commit bcc1182dea
2 changed files with 20 additions and 5 deletions
@@ -79,8 +79,15 @@ public class TimeModule extends BaseHandler implements TimeService {
if (user.isEmpty()) return unauthorized(ex);
var head = path.pop();
return switch (head) {
case STARTED -> getStartedTime(user.get(),ex);
case null, default -> super.doGet(path,ex);
case STARTED -> getStartedTime(user.get(),ex);
case null -> super.doGet(path,ex);
default -> {
try {
yield sendContent(ex,timeDb.load(Long.parseLong(head)));
} catch (NumberFormatException ignored) {
yield super.doGet(path,ex);
}
}
};
} catch (UmbrellaException e){
return send(ex,e);