improved time table: now updating started time when starting new time track
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user