mirror of
https://github.com/cpvalente/ontime.git
synced 2026-08-14 20:03:52 +00:00
feat: allow add time to aux timer
This commit is contained in:
committed by
Carlos Valente
parent
7dec32aea7
commit
1e8706aa73
@@ -241,6 +241,11 @@ const actionHandlers: Record<string, ActionHandler> = {
|
||||
const timeInMs = numberOrError(command.duration) * 1000;
|
||||
reply.payload = auxTimerService.setTime(timeInMs);
|
||||
}
|
||||
if ('addtime' in command) {
|
||||
// convert addTime in seconds to ms
|
||||
const timeInMs = numberOrError(command.addtime) * 1000;
|
||||
reply.payload = auxTimerService.addTime(timeInMs);
|
||||
}
|
||||
if ('direction' in command) {
|
||||
if (command.direction === SimpleDirection.CountUp || command.direction === SimpleDirection.CountDown) {
|
||||
reply.payload = auxTimerService.setDirection(command.direction);
|
||||
|
||||
Reference in New Issue
Block a user